This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/13386] BUG: using smp_processor_id() in preemptible code


http://sourceware.org/bugzilla/show_bug.cgi?id=13386

--- Comment #1 from Mark Wielaard <mjw at redhat dot com> 2011-11-06 21:47:43 UTC ---
Found two more, one in _stp_vsnprintf and another in _stp_reserve_bytes:

Nov  6 00:04:57 armando kernel: [19775.710420] BUG: using smp_processor_id() in
preemptible [00000000] code: stapio/3646
Nov  6 00:04:57 armando kernel: [19775.717338] caller is
_stp_vsnprintf+0x5b8/0x1048 [stap_2b091f3dbad1f4bb58af3d26c710df1_3646]
Nov  6 00:04:57 armando kernel: [19775.717379] Backtrace:
Nov  6 00:04:57 armando kernel: [19775.717489] [<c00428d0>]
(unwind_backtrace+0x0/0xe0) from [<c023e610>]
(debug_smp_processor_id+0xbc/0xf0)
Nov  6 00:04:57 armando kernel: [19775.717604] [<c023e610>]
(debug_smp_processor_id+0xbc/0xf0) from [<bf19adac>] 
(_stp_vsnprintf+0x5b8/0x1048 [stap_2b091f3dbad1f4bb58af3d26c710df1_3646])
Nov  6 00:04:57 armando kernel: [19775.717785] [<bf19adac>]
(_stp_vsnprintf+0x5b8/0x1048 [stap_2b091f3dbad1f4bb58af3d26c710df1_3646]) from
[<bf19b880>] (_stp_printf+0x20/0x2c
[stap_2b091f3dbad1f4bb58af3d26c710df1_3646])
Nov  6 00:04:57 armando kernel: [19775.717931] [<bf19b880>]
(_stp_printf+0x20/0x2c [stap_2b091f3dbad1f4bb58af3d26c710df1_3646]) from
[<bf19bec0>] (_stp_cleanup_and_exit+0x19c/0x9e0
[stap_2b091f3dbad1f4bb58af3d26c710df1_3646])
Nov  6 00:04:57 armando kernel: [19775.718078] [<bf19bec0>]
(_stp_cleanup_and_exit+0x19c/0x9e0 [stap_2b091f3dbad1f4bb58af3d26c710df1_3646])
from [<bf19cab4>] (_stp_ctl_write_cmd+0x3b0/0x674
[stap_2b091f3dbad1f4bb58af3d26c710df1_3646])
Nov  6 00:04:57 armando kernel: [19775.718214] [<bf19cab4>]
(_stp_ctl_write_cmd+0x3b0/0x674 [stap_2b091f3dbad1f4bb58af3d26c710df1_3646])
from [<c01139c8>] (vfs_write+0xb0/0x178)
Nov  6 00:04:57 armando kernel: [19775.718303] [<c01139c8>]
(vfs_write+0xb0/0x178) from [<c0113ca8>] (sys_write+0x3c/0x68)
Nov  6 00:04:57 armando kernel: [19775.718394] [<c0113ca8>
(sys_write+0x3c/0x68) from [<c003b760>] (ret_fast_syscall+0x0/0x30)


Nov  6 00:04:32 armando kernel: [19750.838018] BUG: using smp_processor_id() in
preemptible [00000000] code: stapio/3610
Nov  6 00:04:32 armando kernel: [19750.844055] caller is
_stp_reserve_bytes+0x18/0x84 [stap_dba48f0e091451400655598b741caa3a_2_3610]
Nov  6 00:04:32 armando kernel: [19750.844100] Backtrace:
Nov  6 00:04:32 armando kernel: [19750.844191] [<c00428d0>]
(unwind_backtrace+0x0/0xe0) from [<c023e610>]
(debug_smp_processor_id+0xbc/0xf0)
Nov  6 00:04:32 armando kernel: [19750.844315] [<c023e610>]
(debug_smp_processor_id+0xbc/0xf0) from [<bf17c2cc>] 
(_stp_reserve_bytes+0x18/0x84 [stap_dba48f0e091451400655598b741caa3a_2_3610])
Nov  6 00:04:32 armando kernel: [19750.844485] [<bf17c2cc>]
(_stp_reserve_bytes+0x18/0x84 [stap_dba48f0e091451400655598b741caa3a_2_3610])
from [<bf17c8f8>] (_stp_vsnprintf+0x448/0x9f4
[stap_dba48f0e091451400655598b741caa3a_2_3610])
Nov  6 00:04:32 armando kernel: [19750.844654] [<bf17c8f8>]
(_stp_vsnprintf+0x448/0x9f4 [stap_dba48f0e091451400655598b741caa3a_2_3610])
from [<bf17cee8>] (_stp_printf+0x20/0x2c
[stap_dba48f0e091451400655598b741caa3a_2_3610])
Nov  6 00:04:32 armando kernel: [19750.844832] [<bf17cee8>]
(_stp_printf+0x20/0x2c [stap_dba48f0e091451400655598b741caa3a_2_3610]) from
[<bf17e198>] (_stp_cleanup_and_exit+0x280/0x448
[stap_dba48f0e091451400655598b741caa3a_2_3610])
Nov  6 00:04:32 armando kernel: [19750.845011] [<bf17e198>]
(_stp_cleanup_and_exit+0x280/0x448 [stap_dba48f0e0914
51400655598b741caa3a_2_3610]) from [<bf17e7d0>] (_stp_ctl_write_cmd+0x470/0x778
[stap_dba48f0e091451400655598b741caa3a_2_3610])
Nov  6 00:04:32 armando kernel: [19750.845159] [<bf17e7d0>]
(_stp_ctl_write_cmd+0x470/0x778 [stap_dba48f0e091451400655598b741caa3a_2_3610])
from [<c01139c8>] (vfs_write+0xb0/0x178)
Nov  6 00:04:32 armando kernel: [19750.845250] [<c01139c8>]
(vfs_write+0xb0/0x178) from [<c0113ca8>] (sys_write+0x3c/0x68)
Nov  6 00:04:32 armando kernel: [19750.845336] [<c0113ca8>]
(sys_write+0x3c/0x68) from [<c003b760>] (ret_fast_syscall+0x0/0x30)


These do seem dangerous in case the code is preempted shortly after the usage
of smp_processor_id() is called. Are we sure we cannot be preempted in these
cases?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]