Skip to contentSkip to conversation

Bug in v7_coherent_kern_range() ?

DISCUSSION Huang Shijie 4 participants 20 messages Apr 1, 2012 – May 10, 2012 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

[1] Platform:
freescale's IMX6Q(4 cores) , ARM CORTEX-A9

[2] kernel:
3.0.15(I have cherry-picked many patches, and the arch/arm/mm/cache-v7.S is same code with the latest kernel v3.4-rc1)
enable SMP, VIPT,

[3] application:
I use our our application which will clone many threads, two threads (assume as A and B) may do the same thing at the same time as the following code:

In most of the time, it's ok.
But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

open("/usr/lib/lib_mp3_dec_arm12_elinux.so.2.10.0", O_RDONLY) = 8 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\35\0\0004\0\0\0"...,
512) = 512
fstat64(8, {st_mode=S_IFREG|0644, st_size=56232, ...}) = 0 mmap2(NULL, 88032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2ff0a000
mprotect(0x2ff18000, 28672, PROT_NONE) = 0
mmap2(0x2ff1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xd) = 0x2ff1f000 close(8) = 0
mprotect(0x2ff0a000, 57344, PROT_READ|PROT_WRITE) = 0 mprotect(0x2ff0a000, 57344, PROT_READ|PROT_EXEC) = 0 cacheflush(0x2ff0a000, 0x2ff18000, 0, 0x6, 0x2cd03420) = 0 // System hung up here!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[4] kernel log
I use "echo t > /proc/sysrq-trigger" to show the tasks's information:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The do_cache_op() has already held the mm->mmap_sem, but v7_coherent_kern_range()
cause one page fault during it flush the cache. deadlock! So it hung up in the do_page_fault().

[5] questions:
Why the v7_coherent_kern_range() can caused the data abort? Is there something wrong about the v7_coherent_kern_range()?

thanks
Huang Shijie

#1 lore raw

Hi Huang Shijie,

Quoted 7 lines · Huang Shijie

[1] Platform:
freescale's IMX6Q(4 cores) , ARM CORTEX-A9

[2] kernel:
3.0.15(I have cherry-picked many patches, and the arch/arm/mm/cache-v7.S is same code with the latest kernel v3.4-rc1)
enable SMP, VIPT,

Could you try an unpatched, clean v3.4-rc1 instead?

What's about your 2.6.38?

What's about 3.0.26? 3.0.15 seems to miss some maybe relevant patches.

Quoted 1 line

[3] application:

Could you share a (simple) test case?

Best regards

Dirk

Quoted 76 lines

I use our our application which will clone many threads, two threads (assume as A and B) may do the same thing at the same time as the following code:

In most of the time, it's ok.
But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

open("/usr/lib/lib_mp3_dec_arm12_elinux.so.2.10.0", O_RDONLY) = 8 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\35\0\0004\0\0\0"...,
512) = 512
fstat64(8, {st_mode=S_IFREG|0644, st_size=56232, ...}) = 0 mmap2(NULL, 88032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2ff0a000
mprotect(0x2ff18000, 28672, PROT_NONE) = 0
mmap2(0x2ff1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xd) = 0x2ff1f000 close(8) = 0
mprotect(0x2ff0a000, 57344, PROT_READ|PROT_WRITE) = 0 mprotect(0x2ff0a000, 57344, PROT_READ|PROT_EXEC) = 0 cacheflush(0x2ff0a000, 0x2ff18000, 0, 0x6, 0x2cd03420) = 0 // System hung up here!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[4] kernel log
I use "echo t> /proc/sysrq-trigger" to show the tasks's information:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The do_cache_op() has already held the mm->mmap_sem, but v7_coherent_kern_range()
cause one page fault during it flush the cache. deadlock! So it hung up in the do_page_fault().

[5] questions:
Why the v7_coherent_kern_range() can caused the data abort? Is there something wrong about the v7_coherent_kern_range()?

thanks
Huang Shijie

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw

Hi Dirk:

Quoted 6 lines

Hi Huang Shijie,

Quoted 3 lines · Huang Shijie

[1] Platform:
freescale's IMX6Q(4 cores) , ARM CORTEX-A9

Quoted 6 lines
Quoted 4 lines

[2] kernel:
3.0.15(I have cherry-picked many patches, and the arch/arm/mm/cache-v7.S is same code with the latest kernel v3.4-rc1)
enable SMP, VIPT,

Could you try an unpatched, clean v3.4-rc1 instead?

Sorry, I could not try the v3.4-rc1. Some our bsp drivers are not DT supported.

Quoted 2 lines

What's about your 2.6.38?

2.6.38 is not a good version to run the imx6q. It losts many our drivers's patches.

Quoted 3 lines

What's about 3.0.26? 3.0.15 seems to miss some maybe relevant patches.

Our bsp release are based on 3.0.15. so we could not test it on 3.0.26 too.

Quoted 3 lines
Quoted 1 line

[3] application:

Could you share a (simple) test case?

The test case is like this:
#gplay xx.avi

gplay is our own player, such as mplayer.
I just created a script which will play the video files one by one.

BR
Huang Shijie

Quoted 87 lines

Best regards

Dirk

Quoted 80 lines

I use our our application which will clone many threads, two threads (assume as A and B) may do the same thing at the same time as the following code:

In most of the time, it's ok.
But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

open("/usr/lib/lib_mp3_dec_arm12_elinux.so.2.10.0", O_RDONLY) = 8 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\35\0\0004\0\0\0"...,
512) = 512
fstat64(8, {st_mode=S_IFREG|0644, st_size=56232, ...}) = 0 mmap2(NULL, 88032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2ff0a000
mprotect(0x2ff18000, 28672, PROT_NONE) = 0
mmap2(0x2ff1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xd) = 0x2ff1f000 close(8) = 0
mprotect(0x2ff0a000, 57344, PROT_READ|PROT_WRITE) = 0 mprotect(0x2ff0a000, 57344, PROT_READ|PROT_EXEC) = 0 cacheflush(0x2ff0a000, 0x2ff18000, 0, 0x6, 0x2cd03420) = 0 // System hung up here!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[4] kernel log
I use "echo t> /proc/sysrq-trigger" to show the tasks's information:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The do_cache_op() has already held the mm->mmap_sem, but v7_coherent_kern_range()
cause one page fault during it flush the cache. deadlock! So it hung up in the do_page_fault().

[5] questions:
Why the v7_coherent_kern_range() can caused the data abort? Is there something wrong about the v7_coherent_kern_range()?

thanks
Huang Shijie

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

Hi Huang Shijie,

Quoted 13 lines · Huang Shijie

Hi Dirk:

Quoted 12 lines

Hi Huang Shijie,

Quoted 8 lines · Huang Shijie

[1] Platform:
freescale's IMX6Q(4 cores) , ARM CORTEX-A9

[2] kernel:
3.0.15(I have cherry-picked many patches, and the arch/arm/mm/cache-v7.S
is same code with the latest kernel v3.4-rc1) enable SMP, VIPT,

Quoted 3 lines
Quoted 1 line

Could you try an unpatched, clean v3.4-rc1 instead?

Sorry, I could not try the v3.4-rc1. Some our bsp drivers are not DT supported.

I think we are not talking about drivers, we are talking about some kernel core code, like cache handling? To test v7_coherent_kern_range() you might not need to many bsp drivers?

Quoted 8 lines
Quoted 1 line

What's about your 2.6.38?

2.6.38 is not a good version to run the imx6q. It losts many our drivers's patches.

Quoted 3 lines

What's about 3.0.26? 3.0.15 seems to miss some maybe relevant patches.

Our bsp release are based on 3.0.15. so we could not test it on 3.0.26 too.

You can. Just give git rebase a try.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

[3] application:

Could you share a (simple) test case?

The test case is like this:
#gplay xx.avi

gplay is our own player, such as mplayer.

Could you share a (simple) test case? E.g. share 'gplay'? Or try to reproduce your issue with an other test case? E.g. mplayer? Or better anything simpler the community can use to try to reproduce your issue?

Best regards

Dirk

Quoted 98 lines

I just created a script which will play the video files one by one.

BR
Huang Shijie

Quoted 90 lines

Best regards

Dirk

Quoted 83 lines

I use our our application which will clone many threads, two threads (assume as A and B) may do the same thing at the same time as the following code:

In most of the time, it's ok.
But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

open("/usr/lib/lib_mp3_dec_arm12_elinux.so.2.10.0", O_RDONLY) = 8 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\35\0\0004\0\0\0"...,

512) = 512
fstat64(8, {st_mode=S_IFREG|0644, st_size=56232, ...}) = 0 mmap2(NULL, 88032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0)
= 0x2ff0a000
mprotect(0x2ff18000, 28672, PROT_NONE) = 0 mmap2(0x2ff1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xd) = 0x2ff1f000 close(8) = 0
mprotect(0x2ff0a000, 57344, PROT_READ|PROT_WRITE) = 0 mprotect(0x2ff0a000, 57344, PROT_READ|PROT_EXEC) = 0 cacheflush(0x2ff0a000, 0x2ff18000, 0, 0x6, 0x2cd03420) = 0 // System hung up here!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[4] kernel log
I use "echo t> /proc/sysrq-trigger" to show the tasks's information:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The do_cache_op() has already held the mm->mmap_sem, but v7_coherent_kern_range()
cause one page fault during it flush the cache. deadlock! So it hung up
in the do_page_fault().

[5] questions:
Why the v7_coherent_kern_range() can caused the data abort? Is there something wrong about the v7_coherent_kern_range()?

thanks
Huang Shijie

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw

Hi Dirk:

Quoted 16 lines

Hi Huang Shijie,

Quoted 13 lines · Huang Shijie

Hi Dirk:

Quoted 12 lines

Hi Huang Shijie,

Quoted 8 lines · Huang Shijie

[1] Platform:
freescale's IMX6Q(4 cores) , ARM CORTEX-A9

[2] kernel:
3.0.15(I have cherry-picked many patches, and the arch/arm/mm/cache-v7.S
is same code with the latest kernel v3.4-rc1) enable SMP, VIPT,

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Could you try an unpatched, clean v3.4-rc1 instead?

Sorry, I could not try the v3.4-rc1. Some our bsp drivers are not DT supported.

I think we are not talking about drivers, we are talking about some kernel core code, like cache handling? To test v7_coherent_kern_range() you might not need to many bsp drivers?

Yes , the gplay will use the vpu driver. But the VPU driver is not in the kernel. Without the vpu driver, the gplay can not works.

Quoted 11 lines
Quoted 9 lines
Quoted 2 lines

What's about your 2.6.38?

2.6.38 is not a good version to run the imx6q. It losts many our drivers's patches.

Quoted 3 lines

What's about 3.0.26? 3.0.15 seems to miss some maybe relevant patches.

Our bsp release are based on 3.0.15. so we could not test it on 3.0.26 too.

You can. Just give git rebase a try.

It will be a nightmare to me. We have nearly 1000 patches. I will cost me much time to handle the conflicts.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

[3] application:

Could you share a (simple) test case?

Quoted 8 lines
Quoted 4 lines

The test case is like this:
#gplay xx.avi

gplay is our own player, such as mplayer.

Could you share a (simple) test case? E.g. share 'gplay'? Or try to reproduce your issue with an other test case? E.g. mplayer? Or better anything simpler the community can use to try to reproduce your issue?

I can email to you the gplay, if you have an imx6q board. you can test it. I just wish someone give me some advice about this issue.

I find the arch/arm/include/asm/assembler.h is out of date. So I will update it and test it again.

thanks a lot , Dirk.

Huang Shijie

Quoted 110 lines

Best regards

Dirk

Quoted 103 lines

I just created a script which will play the video files one by one.

BR
Huang Shijie

Quoted 95 lines

Best regards

Dirk

Quoted 88 lines

I use our our application which will clone many threads, two threads (assume as A and B) may do the same thing at the same time as the following code:

In most of the time, it's ok.
But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

open("/usr/lib/lib_mp3_dec_arm12_elinux.so.2.10.0", O_RDONLY) = 8 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\35\0\0004\0\0\0"...,

512) = 512
fstat64(8, {st_mode=S_IFREG|0644, st_size=56232, ...}) = 0 mmap2(NULL, 88032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0)
= 0x2ff0a000
mprotect(0x2ff18000, 28672, PROT_NONE) = 0 mmap2(0x2ff1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xd) = 0x2ff1f000 close(8) = 0
mprotect(0x2ff0a000, 57344, PROT_READ|PROT_WRITE) = 0 mprotect(0x2ff0a000, 57344, PROT_READ|PROT_EXEC) = 0 cacheflush(0x2ff0a000, 0x2ff18000, 0, 0x6, 0x2cd03420) = 0 // System hung up here!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[4] kernel log
I use "echo t> /proc/sysrq-trigger" to show the tasks's information:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The do_cache_op() has already held the mm->mmap_sem, but v7_coherent_kern_range()
cause one page fault during it flush the cache. deadlock! So it hung up
in the do_page_fault().

[5] questions:
Why the v7_coherent_kern_range() can caused the data abort? Is there something wrong about the v7_coherent_kern_range()?

thanks
Huang Shijie

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw
Quoted 18 lines · Huang Shijie

Hi Dirk:

Quoted 17 lines

Hi Huang Shijie,

Quoted 14 lines · Huang Shijie

Hi Dirk:

Quoted 13 lines

Hi Huang Shijie,

Quoted 8 lines · Huang Shijie

[1] Platform:
freescale's IMX6Q(4 cores) , ARM CORTEX-A9

[2] kernel:
3.0.15(I have cherry-picked many patches, and the arch/arm/mm/cache-v7.S
is same code with the latest kernel v3.4-rc1) enable SMP, VIPT,

Could you try an unpatched, clean v3.4-rc1 instead?

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Sorry, I could not try the v3.4-rc1. Some our bsp drivers are not DT supported.

I think we are not talking about drivers, we are talking about some kernel core code, like cache handling? To test v7_coherent_kern_range() you might not need to many bsp drivers?

Yes , the gplay will use the vpu driver. But the VPU driver is not in the kernel. Without the vpu driver, the gplay can not works.

You could try to disable the vpu driver and check if the issue is still there, then.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

What's about your 2.6.38?

2.6.38 is not a good version to run the imx6q. It losts many our drivers's patches.

Quoted 4 lines

What's about 3.0.26? 3.0.15 seems to miss some maybe relevant patches.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Our bsp release are based on 3.0.15. so we could not test it on 3.0.26 too.

You can. Just give git rebase a try.

It will be a nightmare to me. We have nearly 1000 patches. I will cost me much time to handle the conflicts.

IMHO you will get one easy to solve merge conflict. So it should you take < 10min to rebase to 3.0.26. Just try it ;)

Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

[3] application:

Could you share a (simple) test case?

The test case is like this:
#gplay xx.avi

gplay is our own player, such as mplayer.

Quoted 7 lines
Quoted 4 lines

Could you share a (simple) test case? E.g. share 'gplay'? Or try to reproduce your issue with an other test case? E.g. mplayer? Or better anything simpler the community can use to try to reproduce your issue?

I can email to you the gplay, if you have an imx6q board. you can test it.
I just wish someone give me some advice about this issue.

It would help to use a kernel version and a test case the community can use to reproduce.

Best regards

Dirk

Quoted 120 lines

I find the arch/arm/include/asm/assembler.h is out of date. So I will update it and test it again.

thanks a lot , Dirk.

Huang Shijie

Quoted 111 lines

Best regards

Dirk

Quoted 104 lines

I just created a script which will play the video files one by one.

BR
Huang Shijie

Quoted 96 lines

Best regards

Dirk

Quoted 89 lines

I use our our application which will clone many threads, two threads (assume as A and B) may do the same thing at the same time
as the following code:

In most of the time, it's ok.
But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

open("/usr/lib/lib_mp3_dec_arm12_elinux.so.2.10.0", O_RDONLY) = 8 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\35\0\0004\0\0\0"...,

512) = 512
fstat64(8, {st_mode=S_IFREG|0644, st_size=56232, ...}) = 0 mmap2(NULL, 88032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0)
= 0x2ff0a000
mprotect(0x2ff18000, 28672, PROT_NONE) = 0 mmap2(0x2ff1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xd) = 0x2ff1f000 close(8) = 0
mprotect(0x2ff0a000, 57344, PROT_READ|PROT_WRITE) = 0 mprotect(0x2ff0a000, 57344, PROT_READ|PROT_EXEC) = 0 cacheflush(0x2ff0a000, 0x2ff18000, 0, 0x6, 0x2cd03420) = 0 // System hung up here!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[4] kernel log
I use "echo t> /proc/sysrq-trigger" to show the tasks's information:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The do_cache_op() has already held the mm->mmap_sem, but v7_coherent_kern_range()
cause one page fault during it flush the cache. deadlock! So it hung up
in the do_page_fault().

[5] questions:
Why the v7_coherent_kern_range() can caused the data abort? Is there something wrong about the v7_coherent_kern_range()?

thanks
Huang Shijie

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#6 lore raw

? 2012?04?01? 16:50, Dirk Behme ??:

Quoted 22 lines · Huang Shijie
Quoted 21 lines

Hi Dirk:

Quoted 20 lines

Hi Huang Shijie,

Quoted 16 lines · Huang Shijie

Hi Dirk:

Quoted 6 lines

Hi Huang Shijie,

Quoted 3 lines · Huang Shijie

[1] Platform:
freescale's IMX6Q(4 cores) , ARM CORTEX-A9

Quoted 7 lines
Quoted 5 lines

[2] kernel:
3.0.15(I have cherry-picked many patches, and the arch/arm/mm/cache-v7.S
is same code with the latest kernel v3.4-rc1) enable SMP, VIPT,

Could you try an unpatched, clean v3.4-rc1 instead?

Sorry, I could not try the v3.4-rc1. Some our bsp drivers are not DT supported.

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

I think we are not talking about drivers, we are talking about some kernel core code, like cache handling? To test v7_coherent_kern_range() you might not need to many bsp drivers?

Yes , the gplay will use the vpu driver. But the VPU driver is not in the kernel. Without the vpu driver, the gplay can not works.

You could try to disable the vpu driver and check if the issue is still there, then.

:(
I have no idea how to reproduce this issue if i disable the vpu driver.

Quoted 30 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

What's about your 2.6.38?

2.6.38 is not a good version to run the imx6q. It losts many our drivers's patches.

Quoted 4 lines

What's about 3.0.26? 3.0.15 seems to miss some maybe relevant patches.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Our bsp release are based on 3.0.15. so we could not test it on 3.0.26 too.

You can. Just give git rebase a try.

It will be a nightmare to me. We have nearly 1000 patches. I will cost me much time to handle the conflicts.

IMHO you will get one easy to solve merge conflict. So it should you take < 10min to rebase to 3.0.26. Just try it ;)

Quoted 13 lines
Quoted 13 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

[3] application:

Could you share a (simple) test case?

The test case is like this:
#gplay xx.avi

gplay is our own player, such as mplayer.

Could you share a (simple) test case? E.g. share 'gplay'? Or try to reproduce your issue with an other test case? E.g. mplayer? Or better anything simpler the community can use to try to reproduce your issue?

Quoted 7 lines
Quoted 3 lines

I can email to you the gplay, if you have an imx6q board. you can test it.
I just wish someone give me some advice about this issue.

It would help to use a kernel version and a test case the community can use to reproduce.

I know.

thanks
Huang Shijie

Quoted 131 lines

Best regards

Dirk

Quoted 125 lines

I find the arch/arm/include/asm/assembler.h is out of date. So I will update it and test it again.

thanks a lot , Dirk.

Huang Shijie

Quoted 116 lines

Best regards

Dirk

Quoted 109 lines

I just created a script which will play the video files one by one.

BR
Huang Shijie

Quoted 101 lines

Best regards

Dirk

Quoted 94 lines

I use our our application which will clone many threads, two threads (assume as A and B) may do the same thing at the same time
as the following code:

In most of the time, it's ok.
But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

open("/usr/lib/lib_mp3_dec_arm12_elinux.so.2.10.0", O_RDONLY) = 8 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\35\0\0004\0\0\0"...,

512) = 512
fstat64(8, {st_mode=S_IFREG|0644, st_size=56232, ...}) = 0 mmap2(NULL, 88032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0)
= 0x2ff0a000
mprotect(0x2ff18000, 28672, PROT_NONE) = 0 mmap2(0x2ff1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xd) = 0x2ff1f000 close(8) = 0
mprotect(0x2ff0a000, 57344, PROT_READ|PROT_WRITE) = 0 mprotect(0x2ff0a000, 57344, PROT_READ|PROT_EXEC) = 0 cacheflush(0x2ff0a000, 0x2ff18000, 0, 0x6, 0x2cd03420) = 0 // System hung up here!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[4] kernel log
I use "echo t> /proc/sysrq-trigger" to show the tasks's information:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The do_cache_op() has already held the mm->mmap_sem, but v7_coherent_kern_range()
cause one page fault during it flush the cache. deadlock! So it hung up
in the do_page_fault().

[5] questions:
Why the v7_coherent_kern_range() can caused the data abort? Is there something wrong about the v7_coherent_kern_range()?

thanks
Huang Shijie

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#7 lore raw
In reply to Huang Shijie
Quoted 13 lines · Huang Shijie

Hi Dirk:

Quoted 12 lines

Hi Huang Shijie,

Quoted 8 lines · Huang Shijie

[1] Platform:
freescale's IMX6Q(4 cores) , ARM CORTEX-A9

[2] kernel:
3.0.15(I have cherry-picked many patches, and the arch/arm/mm/cache-v7.S
is same code with the latest kernel v3.4-rc1) enable SMP, VIPT,

Quoted 3 lines
Quoted 1 line

Could you try an unpatched, clean v3.4-rc1 instead?

Sorry, I could not try the v3.4-rc1. Some our bsp drivers are not DT supported.

Have you tried the 3.2 based Linaro kernel? It's DT based.

Best regards

Dirk

Quoted 114 lines
Quoted 1 line

What's about your 2.6.38?

2.6.38 is not a good version to run the imx6q. It losts many our drivers's patches.

Quoted 3 lines

What's about 3.0.26? 3.0.15 seems to miss some maybe relevant patches.

Our bsp release are based on 3.0.15. so we could not test it on 3.0.26 too.

Quoted 3 lines
Quoted 1 line

[3] application:

Could you share a (simple) test case?

The test case is like this:
#gplay xx.avi

gplay is our own player, such as mplayer.
I just created a script which will play the video files one by one.

BR
Huang Shijie

Quoted 90 lines

Best regards

Dirk

Quoted 83 lines

I use our our application which will clone many threads, two threads (assume as A and B) may do the same thing at the same time as the following code:

In most of the time, it's ok.
But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

open("/usr/lib/lib_mp3_dec_arm12_elinux.so.2.10.0", O_RDONLY) = 8 read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\35\0\0004\0\0\0"...,

512) = 512
fstat64(8, {st_mode=S_IFREG|0644, st_size=56232, ...}) = 0 mmap2(NULL, 88032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0)
= 0x2ff0a000
mprotect(0x2ff18000, 28672, PROT_NONE) = 0 mmap2(0x2ff1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xd) = 0x2ff1f000 close(8) = 0
mprotect(0x2ff0a000, 57344, PROT_READ|PROT_WRITE) = 0 mprotect(0x2ff0a000, 57344, PROT_READ|PROT_EXEC) = 0 cacheflush(0x2ff0a000, 0x2ff18000, 0, 0x6, 0x2cd03420) = 0 // System hung up here!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[4] kernel log
I use "echo t> /proc/sysrq-trigger" to show the tasks's information:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The do_cache_op() has already held the mm->mmap_sem, but v7_coherent_kern_range()
cause one page fault during it flush the cache. deadlock! So it hung up
in the do_page_fault().

[5] questions:
Why the v7_coherent_kern_range() can caused the data abort? Is there something wrong about the v7_coherent_kern_range()?

thanks
Huang Shijie

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#8 lore raw

Hi Dirk:

Quoted 3 lines

Have you tried the 3.2 based Linaro kernel? It's DT based.

not yet.

I will test the it.

BR
Huang Shijie

#10 lore raw
In reply to Huang Shijie
Quoted 2 lines · Huang Shijie

But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:

[...]

Quoted 10 lines

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)
Quoted 10 lines

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)

Please can you try the patch posted here:?

http://lists.arm.linux.org.uk/lurker/message/20111107.173344.f738392e.en.html

If it fixes your problem, please consider giving a tested-by.

Will

author Tested-by
#11 lore raw

Hi Will:

Quoted 25 lines · Huang Shijie
Quoted 2 lines

But in some unknown situation, cacheflush() failed and one threads (assume A) may hung up in the following code:

[...]

Quoted 10 lines

multiqueue0:src D 804cd678 0 7328 5963 0x00000001 [<804cd678>] (__schedule+0x228/0x760) from [<804d0564>] (__down_read+0xa8/0xe0)
[<804d0564>] (__down_read+0xa8/0xe0) from [<800478c4>] (do_page_fault+0xbc/0x480)
[<800478c4>] (do_page_fault+0xbc/0x480) from [<8003841c>] (do_DataAbort+0x34/0x98)
[<8003841c>] (do_DataAbort+0x34/0x98) from [<8003df10>] (__dabt_svc+0x70/0xa0)

Exception stack(0xbae37ea8 to 0xbae37ef0)
Quoted 10 lines

7ea0: 31e05000 31e1d000 00000020 0000001f 31e05000 31e1d000 7ec0: bfac86b8 31e05000 31e1d000 bae36000 08100075 31e056fc 31e08000 bae37ef0
7ee0: 800424a8 8004a1fc 800f0013 ffffffff
[<8003df10>] (__dabt_svc+0x70/0xa0) from [<8004a1fc>] (v7_coherent_kern_range+0x20/0x80)
[<8004a1fc>] (v7_coherent_kern_range+0x20/0x80) from [<800424a8>] (arm_syscall+0x2a0/0x2c4)
[<800424a8>] (arm_syscall+0x2a0/0x2c4) from [<8003e500>] (ret_fast_syscall+0x0/0x3c)

Quoted 3 lines

Please can you try the patch posted here:?

http://lists.arm.linux.org.uk/lurker/message/20111107.173344.f738392e.en.html

I tested this patch. It fixed this bug. This bug did not occur any more. But my system still hung at futex. I think the futex issue is another bug.(will this patch affect the futex?)

So :

BR
Huang Shijie

Quoted 4 lines

If it fixes your problem, please consider giving a tested-by.

Will

#12 lore raw
Quoted 5 lines · Huang Shijie
Quoted 2 lines

http://lists.arm.linux.org.uk/lurker/message/20111107.173344.f738392e.en.html

I tested this patch. It fixed this bug. This bug did not occur any more. But my system still hung at futex. I think the futex issue is another bug.(will this patch affect the futex?)

If you're on an SMP system, can you check that you have df77abca ("ARM:
7099/1: futex: preserve oldval in SMP __futex_atomic_op") applied?

Quoted 2 lines

So :

Ok, thanks. It looks that has briefly revived the discussion over there at least.

Will

#13 lore raw

Hi will:

Quoted 8 lines · Huang Shijie
Quoted 4 lines
Quoted 1 line

http://lists.arm.linux.org.uk/lurker/message/20111107.173344.f738392e.en.html

I tested this patch. It fixed this bug. This bug did not occur any more. But my system still hung at futex. I think the futex issue is another bug.(will this patch affect the futex?)

If you're on an SMP system, can you check that you have df77abca ("ARM:
7099/1: futex: preserve oldval in SMP __futex_atomic_op") applied?

already applied.
thanks.

The futex codes (/kernel/futex.c and arch/arm/include/asm/futex.h) are the latest.
I guess there is a bug in the futex code in SMP system.

Best Regards
Huang Shijie

Quoted 7 lines
Quoted 2 lines

So :

Ok, thanks. It looks that has briefly revived the discussion over there at least.

Will

#14 lore raw
Quoted 9 lines · Huang Shijie
Quoted 8 lines · Huang Shijie
Quoted 4 lines
Quoted 1 line

http://lists.arm.linux.org.uk/lurker/message/20111107.173344.f738392e.en.html

I tested this patch. It fixed this bug. This bug did not occur any more. But my system still hung at futex. I think the futex issue is another bug.(will this patch affect the futex?)

If you're on an SMP system, can you check that you have df77abca ("ARM:
7099/1: futex: preserve oldval in SMP __futex_atomic_op") applied?

Quoted 6 lines

already applied.
thanks.

The futex codes (/kernel/futex.c and arch/arm/include/asm/futex.h) are the latest.
I guess there is a bug in the futex code in SMP system.

Ok. Can you please:

(a) Make your test case available somewhere?

(b) Try a more recent mainline kernel (3.3)?

Also - which libc are you using? Some older library implementations incorrectly use swp for atomicity. If you have swp emulation enabled, this could cause a lock-up. Do you have CONFIG_SWP_EMULATE=y?

Will

A message that is not in the archive (sent off-list or not yet received): [email protected]

#16 lore raw
Quoted 7 lines · Huang Shijie

Ok. Can you please:

(a) Make your test case available somewhere?

I wish i could find a more common test case to reproduce this bug. But, i can't. The only test case now is to run the gplay on our IMX6Q platform.

Ok, that makes it tricky since I don't have gplay or an IMX6Q platform.

Quoted 4 lines

(b) Try a more recent mainline kernel (3.3)?

yes, I will try to test the linaro kernel.

Can you not try vanilla mainline instead? Either way, let me know how you get on.

Quoted 3 lines

The info of the libc:
GNU libc version: 2.13
GNU libc release: stable

That looks new enough for swp not to be an issue.

If you still have this problem with a newer kernel, we can try using the fallback SMP futex implementation and see if that works.

Will

#17 lore raw
Quoted 4 lines · Will Deacon
Quoted 2 lines

I wish i could find a more common test case to reproduce this bug. But, i can't. The only test case now is to run the gplay on our IMX6Q platform.

Ok, that makes it tricky since I don't have gplay or an IMX6Q platform.

gplay is a C application that does the same thing as launching a simple Gstreamer pipeline like:

gst-launch playbin2 uri=file:///home/file.mp4

Huang,

Does the problem also occur if you don?t use the VPU driver? I mean, does it also happen if you decode the file using software codecs. I would like to know if the issue you see is related to the VPU driver or not.

#18 lore raw

? 2012?04?11? 19:02, Fabio Estevam ??:

Quoted 5 lines · Will Deacon
Quoted 4 lines
Quoted 3 lines

I wish i could find a more common test case to reproduce this bug. But, i can't. The only test case now is to run the gplay on our IMX6Q platform.

Ok, that makes it tricky since I don't have gplay or an IMX6Q platform.

Quoted 8 lines

gplay is a C application that does the same thing as launching a simple Gstreamer pipeline like:

gst-launch playbin2 uri=file:///home/file.mp4

Huang,

Does the problem also occur if you don?t use the VPU driver? I mean,

I do not test the case with the VPU disabled.

Quoted 2 lines

does it also happen if you decode the file using software codecs. I would like to know if the issue you see is related to the VPU driver

Can the vpu affects the futex? I am debugging an uart bug now. I will continue to debug this bug when i finish the uart bug.

Best Regards
Huang Shijie

Quoted 2 lines

or not.

#19 lore raw
In reply to Will Deacon

Hi Will:

Quoted 3 lines

If you still have this problem with a newer kernel, we can try using the fallback SMP futex implementation and see if that works.

After we update our application(gstreamer), the futex issue gone. So this is not a kernel bug, but an application bug.

thanks for your help.

Huang Shijie

#20 lore raw
Quoted 6 lines · Huang Shijie

Hi Will:

Quoted 3 lines

If you still have this problem with a newer kernel, we can try using the fallback SMP futex implementation and see if that works.

After we update our application(gstreamer), the futex issue gone. So this is not a kernel bug, but an application bug.

That's good to hear, thanks for reporting back.

Will