[Bug 1058509] New: grub segfault in ncurses
http://bugzilla.suse.com/show_bug.cgi?id=1058509 Bug ID: 1058509 Summary: grub segfault in ncurses Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: All OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader Assignee: jsrain@suse.com Reporter: Ralf.Friedl@online.de QA Contact: jsrain@suse.com Found By: --- Blocker: --- The current grub-0.97-204.3.x86_64 has a segfault upon invocation. # gdb grub ... (gdb) run Starting program: /usr/sbin/grub Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) where #0 0x00000000 in ?? () #1 0x08084076 in new_prescr () at ../ncurses/tinfo/lib_setup.c:890 #2 0x080722ad in newterm (name=0xffffdde8 "screen", ofp=0x81693e0 <_IO_2_1_stdout_>, ifp=0x8169540 <_IO_2_1_stdin_>) at ../ncurses/base/lib_newterm.c:355 #3 0x0806e25b in initscr () at ../ncurses/base/lib_initscr.c:89 #4 0x08048fb0 in grub_stage2 () at asmstub.c:190 #5 0x08048e8e in main (argc=1, argv=0xffffd444) at main.c:264 "grub --batch" works, but without command completion. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 Jiri Srain <jsrain@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jsrain@suse.com |duwe@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c6 Torsten Duwe <duwe@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|duwe@suse.com |werner@suse.com --- Comment #6 from Torsten Duwe <duwe@suse.com> --- Werner, this is obviously caused by your hack in revision 60. Note that GRUB_LIBS is detected by autoconf; do not override it after detection. grub-configure-check-libncurses was added to get it right, and you hard-coded it afterwards. Please fix this properly. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c9 --- Comment #9 from Torsten Duwe <duwe@suse.com> --- Can you please try the packages from https://download.opensuse.org/repositories/home:/duwe:/branches:/Base:/Syste... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c10 --- Comment #10 from Torsten Duwe <duwe@suse.com> --- (In reply to Dr. Werner Fink from comment #7)
(In reply to Torsten Duwe from comment #6)
Werner, this is obviously caused by your hack in revision 60.
Note that GRUB_LIBS is detected by autoconf; do not override it after detection. grub-configure-check-libncurses was added to get it right,
This patch ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and you hard-coded it afterwards.
Please fix this properly.
About which hack you are talking about?
Adds an autoconf snipped to properly autodetect GRUB_LIBS. And you override the result with a hard coded value. I call that a hack. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c16 Torsten Duwe <duwe@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS --- Comment #16 from Torsten Duwe <duwe@suse.com> --- (In reply to Ralf Friedl from comment #14)
Therefor I really appreciated the change to a statically linked grub that no longer needs the 32-Bit libraries. Given the choice I would use grub in batch mode, which still works, and not install the 32-bit libraries.
Thanks for the feedback! A new version is there, linked statically again, but without the configure patch and the result override. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 Torsten Duwe <duwe@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|duwe@suse.com |mchang@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c19 --- Comment #19 from Michael Chang <mchang@suse.com> --- (In reply to Dr. Werner Fink from comment #11)
(In reply to Torsten Duwe from comment #10)
(In reply to Dr. Werner Fink from comment #7)
(In reply to Torsten Duwe from comment #6)
and as the linkter script /usr/lib64/libncurses.so and /usr/lib64/libncursese.so to only link libtinfo or lintinfow as needed I do not see for what this patch should resolve
It resolves the error in configure for detecting the availability of ncurses library. configure:6159: result: no configure:6177: checking for wgetch in -lncurses configure:6202: gcc -o conftest -m32 -m32 -O0 -g -DNDEBUG -W -Wall -Wpointer-arith -fno-reorder-functions -fno-stack-protector -fno-strict-aliasing -minline-all-stringops -fno-asynchronous-unwind-tables -fno-unwind-tables -static -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef conftest.c -lncurses >&5 /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/libncurses.a(lib_getch.o): In function `recur_wgetnstr': /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:368: undefined reference to `_nc_screen_of' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:373: undefined reference to `_nc_globals' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:373: undefined reference to `SP' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:377: undefined reference to `_nc_mutex_lock' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:382: undefined reference to `_nc_mutex_unlock' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/libncurses.a(lib_getch.o): In function `recur_wrefresh': /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:346: undefined reference to `_nc_screen_of' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:347: undefined reference to `_nc_globals' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:347: undefined reference to `SP' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:351: undefined reference to `_nc_mutex_lock' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:356: undefined reference to `_nc_mutex_unlock' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/libncurses.a(lib_getch.o): In function `_nc_ptr_Escdelay': /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:60: undefined reference to `_nc_prescreen' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/libncurses.a(lib_getch.o): In function `set_escdelay': /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch.c:91: undefined reference to `SP' -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(werner@suse.com) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c22 --- Comment #22 from Dr. Werner Fink <werner@suse.com> --- (In reply to Michael Chang from comment #19)
(In reply to Dr. Werner Fink from comment #11)
(In reply to Torsten Duwe from comment #10)
(In reply to Dr. Werner Fink from comment #7)
(In reply to Torsten Duwe from comment #6)
and as the linkter script /usr/lib64/libncurses.so and /usr/lib64/libncursese.so to only link libtinfo or lintinfow as needed I do not see for what this patch should resolve
It resolves the error in configure for detecting the availability of ncurses library.
configure:6159: result: no configure:6177: checking for wgetch in -lncurses configure:6202: gcc -o conftest -m32 -m32 -O0 -g -DNDEBUG -W -Wall -Wpointer-arith -fno-reorder-functions -fno-stack-protector -fno-strict-aliasing -minline-all-stringops -fno-asynchronous-unwind-tables -fno-unwind-tables -static -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef conftest.c -lncurses >&5 /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/libncurses.a(lib_getch.o): In function `recur_wgetnstr': /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:368: undefined reference to `_nc_screen_of' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:373: undefined reference to `_nc_globals' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:373: undefined reference to `SP' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:377: undefined reference to `_nc_mutex_lock' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:382: undefined reference to `_nc_mutex_unlock' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/libncurses.a(lib_getch.o): In function `recur_wrefresh': /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:346: undefined reference to `_nc_screen_of' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:347: undefined reference to `_nc_globals' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:347: undefined reference to `SP' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:351: undefined reference to `_nc_mutex_lock' /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:356: undefined reference to `_nc_mutex_unlock' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/libncurses.a(lib_getch.o): In function `_nc_ptr_Escdelay': /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:60: undefined reference to `_nc_prescreen' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/libncurses.a(lib_getch.o): In function `set_escdelay': /home/abuild/rpmbuild/BUILD/ncurses-6.1/ncurses/../ncurses/./base/lib_getch. c:91: undefined reference to `SP'
Read /usr/lib64/libncurses.so /* GNU ld script */ INPUT(/lib64/libncurses.so.6 AS_NEEDED(-ltinfo -ldl)) ... and note that with static linking the library libtinfo.a is missed also the command pkg-config ncurses --libs shows -lncurses -ltinfo ... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mchang@suse.com Flags|needinfo?(werner@suse.com) |needinfo?(mchang@suse.com) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c25 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(mchang@suse.com) | --- Comment #25 from Michael Chang <mchang@suse.com> --- (In reply to Dr. Werner Fink from comment #22)
(In reply to Michael Chang from comment #19)
Read /usr/lib64/libncurses.so
/* GNU ld script */ INPUT(/lib64/libncurses.so.6 AS_NEEDED(-ltinfo -ldl))
... and note that with static linking the library libtinfo.a is missed
I know, that's what the grub-configure-check-libncurses solved. I was giving out the initial error to provide more clues as you've stated that "I do not see for what this patch should resolve". Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c26 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(werner@suse.com) --- Comment #26 from Michael Chang <mchang@suse.com> --- Hi Werner, Set needinfo to you, as now is waiting for you to submit fixed ncurses package from Base:System to Factory. :) Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c28 --- Comment #28 from Swamp Workflow Management <swamp@suse.de> --- This is an autogenerated message for OBS integration: This bug (1058509) was mentioned in https://build.opensuse.org/request/show/581952 Factory / ncurses -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c29 --- Comment #29 from Swamp Workflow Management <swamp@suse.de> --- This is an autogenerated message for OBS integration: This bug (1058509) was mentioned in https://build.opensuse.org/request/show/582535 Factory / ncurses -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c32 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|mchang@suse.com |jsrain@suse.com --- Comment #32 from Michael Chang <mchang@suse.com> --- I am no longer maintaining grub. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 Jiri Srain <jsrain@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jsrain@suse.com |stefan.fent@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsrain@suse.com Flags| |needinfo?(jsrain@suse.com) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 http://bugzilla.suse.com/show_bug.cgi?id=1058509#c35 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(mrmazda@earthlink | |.net) --- Comment #35 from Michael Chang <mchang@suse.com> --- (In reply to Felix Miata from comment #31)
Segfaulting continues in 15.0's 0.97-lp150.1.8
You have to update grub, the latest one in update channel should have fixed the problem. https://download.opensuse.org/distribution/leap/15.0/repo/oss/x86_64/grub-0.... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1058509 Jiri Srain <jsrain@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(jsrain@suse.com) | -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com