[Bug 712726] New: Fix error source for a SIGSEGV crash from a small OCaml test program

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c0 Summary: Fix error source for a SIGSEGV crash from a small OCaml test program Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: x86-64 OS/Version: openSUSE 11.4 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: Markus.Elfring@web.de QAContact: qa@suse.de Found By: --- Blocker: --- The compilation of a source file which contains only the instruction 'let _ = Printf.printf "hello\n"' works by the the command 'ocamlopt -o foo foo.ml'. But I get the error message 'Speicherzugriffsfehler' if I try the execution of the generated program './foo' from my test directory. The tool "GNU gdb (GDB) SUSE (7.2-3.3)" shows only a little bit more information at the moment: Program received signal SIGSEGV, Segmentation fault. 0x000000000062ee00 in strcpy@@GLIBC_2.2.5 () Does the package "camlp4/ocaml 3.12.0-2.1" need corresponding improvements? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c Philipp Thomas <pth@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pth@novell.com AssignedTo|pth@novell.com |vcizek@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c1 Vitezslav Cizek <vcizek@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |vcizek@novell.com --- Comment #1 from Vitezslav Cizek <vcizek@novell.com> 2011-08-18 14:53:48 CEST --- Your example works for me on 11.4:
cat ocaml.segfault.ml let _ = Printf.printf "hello\n"
ocamlopt -o foo ocaml.segfault.ml File "ocaml.segfault.ml", line 1, characters 0-1: Warning 24: bad source file name: "Ocaml.segfault" is not a valid module name.
./foo hello
The ocaml package seems to be exactly your version:
rpm -q ocaml ocaml-3.12.0-2.1.x86_64
Aren't you on a 32bit machine? Could you please test ocaml package from Factory repo? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c2 --- Comment #2 from Markus Elfring <Markus.Elfring@web.de> 2011-08-18 17:40:09 UTC --- (In reply to comment #1)
Aren't you on a 32bit machine?
I'm using Linux with the architecture "x86_64" (model: 15.43.1 "AMD Athlon(tm) 64 X2 Dual Core Processor 4200+").
Could you please test ocaml package from Factory repo?
Yes. - I have dared to install the current package "ocaml 3.12.1-27.2" and some corresponding software components. I get still error messages. elfring@Sonne:~/...> ocamlopt -o foo foo.ml && gdb ./foo GNU gdb (GDB) SUSE (7.2-3.3) .. (gdb) r .. Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2 Try: zypper install -C "debuginfo(build-id)=b1d398a5cb1609e7ac1c51a26588e87fc20f753c" Missing separate debuginfo for /lib64/libm.so.6 Try: zypper install -C "debuginfo(build-id)=5ac64cd348d3581ec2a223ee70f42e73cad029cc" Missing separate debuginfo for /lib64/libdl.so.2 Try: zypper install -C "debuginfo(build-id)=9a8d0811525ec7a152dca9e109292adca81857c1" Missing separate debuginfo for /lib64/libc.so.6 Try: zypper install -C "debuginfo(build-id)=d86da932489f9b64217c8a3eef08b260a40fb051" Program received signal SIGSEGV, Segmentation fault. 0x000000000062ede0 in strcpy@@GLIBC_2.2.5 () -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c3 --- Comment #3 from Markus Elfring <Markus.Elfring@web.de> 2011-08-19 17:08:48 UTC --- Is it possible to retrieve more meaningful information (by debug packages) to clarify this error situation? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c4 --- Comment #4 from Markus Elfring <Markus.Elfring@web.de> 2011-08-19 19:25:46 UTC --- (In reply to comment #1) I get also the expected display if the example instruction is executed from the command line by the interpreter. elfring@Sonne:~/...> ocaml Objective Caml version 3.12.1 # let x = Printf.printf "ABC\n";; ABC val x : unit = () -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c5 --- Comment #5 from Vitezslav Cizek <vcizek@novell.com> 2011-08-22 16:26:12 CEST --- It looks like a bug in ocamlopt. Try to install the debug packages and attach the crash backtrace. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c6 --- Comment #6 from Markus Elfring <Markus.Elfring@web.de> 2011-08-22 17:13:36 UTC --- (In reply to comment #5) Which packages provide the corresponding debug information? (The previously suggested "debuginfo" is not found in my installation sources so far.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c7 --- Comment #7 from Vitezslav Cizek <vcizek@novell.com> 2011-08-24 14:31:58 CEST --- Could you send output of 'strace foo' ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c8 --- Comment #8 from Markus Elfring <Markus.Elfring@web.de> 2011-08-24 20:11:24 UTC --- Created an attachment (id=447521) --> (http://bugzilla.novell.com/attachment.cgi?id=447521) small trace log (In reply to comment #7) Yes. - Does the attached log file help to find the error source? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c9 --- Comment #9 from Vitezslav Cizek <vcizek@novell.com> 2011-08-25 12:09:51 CEST --- Not much. Try installing ocaml-debuginfo a then run it in gdb and send output of backtrace command. Could you also attach the foo's core dump? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c10 --- Comment #10 from Markus Elfring <Markus.Elfring@web.de> 2011-08-25 12:19:51 UTC --- (In reply to comment #9)
Try installing ocaml-debuginfo
Is this package really provided by an openSUSE build service repository? Which installation source should I use for this software component? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c11 --- Comment #11 from Vitezslav Cizek <vcizek@novell.com> 2011-08-25 14:36:22 CEST --- You probably need to enable debug repository: sudo zypper ar http://download.opensuse.org/debug/distribution/11.4/repo/oss/ 11.4-debug -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c12 --- Comment #12 from Markus Elfring <Markus.Elfring@web.de> 2011-08-25 13:09:32 UTC --- (In reply to comment #11) Does a separate package like "ocaml-debug-3.12.1-27.2" exist? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c13 --- Comment #13 from Vitezslav Cizek <vcizek@novell.com> 2011-08-25 15:58:29 CEST --- Debug packages aren't enabled for devel:languages:misc project, where ocaml package resides. So there isn't a ocaml-debuginfo-3.12.1-27.2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c14 --- Comment #14 from Markus Elfring <Markus.Elfring@web.de> 2011-08-25 16:07:28 UTC --- (In reply to comment #11) It seems that I do not get more useful information so far despite I have installed the package "ocaml-debuginfo 3.12.0-2.1" together with corresponding software components. elfring@Sonne:~/Projekte/Coccinelle> ocamlopt -o foo foo.ml && gdb ./foo GNU gdb (GDB) SUSE (7.2-3.3) .. Reading symbols from /home/elfring/Projekte/Coccinelle/foo...done. (gdb) run Starting program: /home/elfring/Projekte/Coccinelle/foo Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2 Try: zypper install -C "debuginfo(build-id)=b1d398a5cb1609e7ac1c51a26588e87fc20f753c" Missing separate debuginfo for /lib64/libm.so.6 Try: zypper install -C "debuginfo(build-id)=5ac64cd348d3581ec2a223ee70f42e73cad029cc" Missing separate debuginfo for /lib64/libdl.so.2 Try: zypper install -C "debuginfo(build-id)=9a8d0811525ec7a152dca9e109292adca81857c1" Missing separate debuginfo for /lib64/libc.so.6 Try: zypper install -C "debuginfo(build-id)=d86da932489f9b64217c8a3eef08b260a40fb051" Program received signal SIGSEGV, Segmentation fault. 0x000000000062ee00 in strcpy@@GLIBC_2.2.5 () -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c15 --- Comment #15 from Markus Elfring <Markus.Elfring@web.de> 2011-08-25 16:24:57 UTC --- (In reply to comment #14) Sonne:~ # zypper install -C "debuginfo(build-id)=d86da932489f9b64217c8a3eef08b260a40fb051" "debuginfo(build-id)=9a8d0811525ec7a152dca9e109292adca81857c1" "debuginfo(build-id)=5ac64cd348d3581ec2a223ee70f42e73cad029cc" "debuginfo(build-id)=b1d398a5cb1609e7ac1c51a26588e87fc20f753c" Loading repository data... Warning: Repository 'Haupt-Repository 11.2' appears to outdated. Consider using a different mirror or server. Reading installed packages... No provider of 'debuginfo(build-id) = d86da932489f9b64217c8a3eef08b260a40fb051' found. Resolving package dependencies... The following NEW package is going to be installed: glibc-debuginfo 1 new package to install. Overall download size: 3.5 MiB. After the operation, additional 19.9 MiB will be used. Continue? [y/n/?] (y): Retrieving package glibc-debuginfo-2.11.3-12.15.1.x86_64 (1/1), 3.5 MiB (19.9 MiB unpacked) Retrieving: glibc-debuginfo-2.11.3-12.15.1.x86_64.rpm [done (1.0 MiB/s)] Installing: glibc-debuginfo-2.11.3-12.15.1 [done] elfring@Sonne:~/Projekte/Coccinelle> gdb ./foo .. (gdb) r Starting program: /home/elfring/Projekte/Coccinelle/foo warning: the debug information found in "/usr/lib/debug//lib64/libc-2.11.3.so.debug" does not match "/lib64/libc.so.6" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/lib64/libc-2.11.3.so.debug" does not match "/lib64/libc.so.6" (CRC mismatch). Missing separate debuginfo for /lib64/libc.so.6 Try: zypper install -C "debuginfo(build-id)=d86da932489f9b64217c8a3eef08b260a40fb051" Program received signal SIGSEGV, Segmentation fault. 0x000000000062ee00 in strcpy@@GLIBC_2.2.5 () -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c16 --- Comment #16 from Vitezslav Cizek <vcizek@novell.com> 2011-08-26 11:09:58 CEST --- When you got: Program received signal SIGSEGV, Segmentation fault. 0x000000000062ee00 in strcpy@@GLIBC_2.2.5 () Could you type "bt" in gdb at this point? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c17 --- Comment #17 from Markus Elfring <Markus.Elfring@web.de> 2011-08-26 11:26:52 UTC --- (In reply to comment #16) Yes, of course. - I did not dare it yesterday because of the reported mismatches. Are are there any chances to complete the debug information for the corresponding shared libraries before the next try of the backtrace command? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c18 --- Comment #18 from Vitezslav Cizek <vcizek@suse.com> 2011-08-26 15:49:43 CEST --- This means you have debuginfo package for a different version of glibc than you have installed on your system. As the bug is not in glibc, you don't need that debuginfo anyway. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c19 --- Comment #19 from Markus Elfring <Markus.Elfring@web.de> 2011-08-26 17:41:01 UTC --- (In reply to comment #18)
This means you have debuginfo package for a different version of glibc than you have installed on your system.
I admit that the package "glibc 2.11.3-12.17.1" was installed. I have downgraded it temporarily to the version "2.11.3-12.15.1" to match it with the available debug information.
As the bug is not in glibc, you don't need that debuginfo anyway.
I would like to be sure that I do not blame the wrong software component. (In reply to comment #16) Does the following display show useful details? elfring@Sonne:~/Projekte/Coccinelle> ocamlopt -o foo foo.ml && gdb ./foo GNU gdb (GDB) SUSE (7.2-3.3) .. Reading symbols from /home/elfring/Projekte/Coccinelle/foo...done. (gdb) run Starting program: /home/elfring/Projekte/Coccinelle/foo Program received signal SIGSEGV, Segmentation fault. 0x000000000062ee00 in strcpy@@GLIBC_2.2.5 () (gdb) bt #0 0x000000000062ee00 in strcpy@@GLIBC_2.2.5 () #1 0x000000000041bb4d in caml_register_named_value (vname=6461304, val=6459320) at /usr/include/bits/string3.h:105 #2 0x000000000041da24 in caml_c_call () #3 0x0000000000000064 in ?? () #4 0x0000000000404e29 in caml_program () #5 0x000000000008bb9b in ?? () #6 0x000000000041da7a in caml_start_program () #7 0x0000000000000000 in ?? () By the way: It seems that I do not get a memory file for the program "foo" if I enable the dump generation temporarily. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c20 --- Comment #20 from Vitezslav Cizek <vcizek@suse.com> 2011-08-29 11:24:16 CEST --- (In reply to comment #19)
By the way: It seems that I do not get a memory file for the program "foo" if I enable the dump generation temporarily.
You can generate dump from gdb, after the crash using the 'gcore' command. Perhaps it'll help if you attach the foo binary itself. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c21 --- Comment #21 from Markus Elfring <Markus.Elfring@web.de> 2011-08-29 18:12:30 UTC --- Created an attachment (id=448272) --> (http://bugzilla.novell.com/attachment.cgi?id=448272) memory dump for an OCaml executable file (In reply to comment #20) Would you like to test the attached files again in your execution environments? By the way: Will corresponding debug information become available for the package "glibc 2.11.3-12.17.1"? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=712726 https://bugzilla.novell.com/show_bug.cgi?id=712726#c24 Philipp Thomas <pth@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |WONTFIX --- Comment #24 from Philipp Thomas <pth@suse.com> 2013-06-04 07:02:17 CEST --- This is dead for more than a year -> closing -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com