When I run a dtrace script, dtrace has core dump. The result of pstack is as following: bash-3.00$ sudo pstack ../../../var/core.24080_0_dtrace_1154401928 core ''../../../var/core.24080_0_dtrace_1154401928'' of 24080: /usr/sbin/dtrace -s ./dumpFIFO.dtrace ffffffff7e46e334 strrchr (100351f70, 1001130c0, 1, 1, 10, 1) + c ffffffff7eb49068 dt_cook_op2 (100351fe0, 0, 100351f00, 100351f70, d8, 137) + 1244 ffffffff7eb4ad08 dt_node_cook (3000, 0, ffffffff7eb47d44, ffffffff7ec76cfc, 5, ffffffff7ec6a000) + 58 ffffffff7eb48a5c dt_cook_op2 (1003522f0, 10, 100351fe0, 100352280, 8, 103) + c38 ffffffff7eb4ad08 dt_node_cook (3000, 10, 12770c, ffffffff7ec76cfc, 5, ffffffff7ec6a000) + 58 ffffffff7eb49f94 dt_cook_statement (100352360, 10, 6, 2, 0, 100352380) + c ffffffff7eb4ad08 dt_node_cook (3000, 10, 6060500, ffffffff7ec76cfc, ffffffff7eb4ad08, ffffffff7ec6a000) + 58 ffffffff7eb4adc4 dt_node_list_cook (100351d88, 10, 5, 100352b40, 100352360, ffffffff7ec6a000) + 70 ffffffff7eb4a28c dt_cook_clause (ffffffff7ffff3f8, 10, 1, 3270, 0, 3000) + 1f0 ffffffff7eb4ad08 dt_node_cook (3000, 10, 4, ffffffff7ec76cfc, ffffffff7eb28e8c, ffffffff7ec6a000) + 58 ffffffff7eb28884 dt_compile_one_clause (10010eb70, 100353b00, 10034ad80, 10010c530, 1417b4, 0) + 48 ffffffff7eb28bb0 dt_compile_clause (10010eb70, 100353b00, 10034ad80, 3, ffffffff7ec6a000, 0) + 1c ffffffff7eb29ea8 dt_compile (3000, 3270, ffffffff7ec7fa58, ffffffff7ffff3f8, 728, fc00) + 688 ffffffff7eb2a268 dtrace_program_fcompile (10010eb70, 100109180, 0, 1, 100109a50, ffffffff7ffffbfc) + 24 0000000100003270 compile_file (10010b250, 3, 100005630, 100108ff8, 100109180, ffffffff7ffffbe8) + 70 0000000100004d28 main (100108fd0, ffffffff7ffff9f8, 10010b250, 1, 0, 100108) + 1040 0000000100001d3c _start (0, 0, 0, 0, 0, 0) + 17c It''s reproducable. If someone interested, I can send my dtrace script and core file. This message posted from opensolaris.org
Hey Leslie, On Mon, Jul 31, 2006 at 08:24:46PM -0700, leslie wrote:> When I run a dtrace script, dtrace has core dump. The result of pstack is as following: > bash-3.00$ sudo pstack ../../../var/core.24080_0_dtrace_1154401928 > core ''../../../var/core.24080_0_dtrace_1154401928'' of 24080: /usr/sbin/dtrace -s ./dumpFIFO.dtrace > ffffffff7e46e334 strrchr (100351f70, 1001130c0, 1, 1, 10, 1) + c > ffffffff7eb49068 dt_cook_op2 (100351fe0, 0, 100351f00, 100351f70, d8, 137) + 1244 > ffffffff7eb4ad08 dt_node_cook (3000, 0, ffffffff7eb47d44, ffffffff7ec76cfc, 5, ffffffff7ec6a000) + 58 > ffffffff7eb48a5c dt_cook_op2 (1003522f0, 10, 100351fe0, 100352280, 8, 103) + c38 > ffffffff7eb4ad08 dt_node_cook (3000, 10, 12770c, ffffffff7ec76cfc, 5, ffffffff7ec6a000) + 58 > ffffffff7eb49f94 dt_cook_statement (100352360, 10, 6, 2, 0, 100352380) + c > ffffffff7eb4ad08 dt_node_cook (3000, 10, 6060500, ffffffff7ec76cfc, ffffffff7eb4ad08, ffffffff7ec6a000) + 58 > ffffffff7eb4adc4 dt_node_list_cook (100351d88, 10, 5, 100352b40, 100352360, ffffffff7ec6a000) + 70 > ffffffff7eb4a28c dt_cook_clause (ffffffff7ffff3f8, 10, 1, 3270, 0, 3000) + 1f0 > ffffffff7eb4ad08 dt_node_cook (3000, 10, 4, ffffffff7ec76cfc, ffffffff7eb28e8c, ffffffff7ec6a000) + 58 > ffffffff7eb28884 dt_compile_one_clause (10010eb70, 100353b00, 10034ad80, 10010c530, 1417b4, 0) + 48 > ffffffff7eb28bb0 dt_compile_clause (10010eb70, 100353b00, 10034ad80, 3, ffffffff7ec6a000, 0) + 1c > ffffffff7eb29ea8 dt_compile (3000, 3270, ffffffff7ec7fa58, ffffffff7ffff3f8, 728, fc00) + 688 > ffffffff7eb2a268 dtrace_program_fcompile (10010eb70, 100109180, 0, 1, 100109a50, ffffffff7ffffbfc) + 24 > 0000000100003270 compile_file (10010b250, 3, 100005630, 100108ff8, 100109180, ffffffff7ffffbe8) + 70 > 0000000100004d28 main (100108fd0, ffffffff7ffff9f8, 10010b250, 1, 0, 100108) + 1040 > 0000000100001d3c _start (0, 0, 0, 0, 0, 0) + 17c > > It''s reproducable. If someone interested, I can send my dtrace script and core file.Yes, we''re quite interested -- please send us the D script, and we''ll let you know if we need the core file. - Bryan -------------------------------------------------------------------------- Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc
> When I run a dtrace script, dtrace has core dump. The result of pstack is as > following: > > bash-3.00$ sudo pstack ../../../var/core.24080_0_dtrace_1154401928Leslie, First off, very sorry about the bug you ran into. We appreciate your finding this for us and we''ll get it fixed and the fix included in OpenSolaris soon. The thing that is causing the problem is line 39, which says: self->fd1 = (int)arg0; Earlier in your script you have: inline int fd1 = 0; and the compiler has a dumb bug when an identifier is re-used as both an inline and a thread-local variable under certain circumstances. That all said, it looks to me like you may be mis-using your fd[1-4] identifiers or the inline keyword in your script. (if you fix line 39, you''ll start to see other compiler errors elsewhere). The "inline" keyword is used to declare something which acts like a constant, expanded at compile time. It looks to me like what you''re trying to do is to declare four global variable, fd1-4, which are then set to four file descriptors of various opened files. If so, you''ll want to remove the "inline" keyword there and just say: int fd1; Also, the namespaces and data storage for thread-local and global variables are distinct. So self->fd1 is not the same variable as fd1. So make sure you''re using the variables consistently everywhere. Since I don''t think you want to use inlines at all, you should be able to avoid the bug and get your script to work. If you''re still having trouble, e-mail the alias back and let us know (and perhaps describe a bit more about what your script was intending to do). -Mike -- Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/