Bug 694520

Summary: yast2 segfaults in BootCommon.ycp:1168
Product: [openSUSE] openSUSE 11.4 Reporter: Bernhard Wiedemann <bwiedemann>
Component: YaST2Assignee: Steffen Winterfeldt <snwint>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Critical    
Priority: P3 - Medium CC: forgotten_xs3PtXj4XH, snwint
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.4   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2 logs
y2log
signal
yast2 logs after another crash

Description Bernhard Wiedemann 2011-05-18 09:49:05 UTC
Created attachment 430154 [details]
yast2 logs

yast2 first reported an error creating initrd with empty message and after retrying twice, it segfaulted in BootCommon.ycp:1168
Comment 1 Steffen Winterfeldt 2011-05-18 15:21:18 UTC
You have a test machine to reproduce this?
Comment 2 Steffen Winterfeldt 2011-05-25 10:27:54 UTC
The bug can be triggered choosing 'Other->Propose New Configuration' twice
(shortcut: Alt-E Alt-P, tested with textmode yast).

The trick seems to be to choose the option a second time _before_ yast has
finished the proposal (that is, be quick). On Bernhards test machine yast
takes its time, so this bug can be easily triggered. But it even happens on
my 11.3 workstation if you try hard enough.

So, this rather looks like an UI oder YaST core bug to me.
Comment 3 Thomas Göttlicher 2011-05-26 10:23:57 UTC
The backtrace looks like this:
/usr/lib64/liby2.so.2(_Z20signal_log_backtracev+0x1e)[0x7ff401287d6e]
/usr/lib64/liby2.so.2(_Z14signal_handleri+0x157)[0x7ff401287f77]
/lib64/libc.so.6(+0x32b30)[0x7ff3ff376b30]
/usr/lib64/libycpvalues.so.3(_ZN10YCPElementC2ERKS_+0x4)[0x7ff400bfa394]
/usr/lib64/libycpvalues.so.3(_ZNK10YCPListRep5valueEi+0x138)[0x7ff400bfb908]
/usr/lib64/libycpvalues.so.3(_ZNK10YCPListRep13functionalAddERK8YCPValueb+0x9d)[0x7ff400bfc7bd]
/usr/lib64/libycp.so.3(+0xc7f1b)[0x7ff401564f1b]
/usr/lib64/libycp.so.3(_ZN9YEBuiltin8evaluateEb+0x9ea)[0x7ff40150c90a]
/usr/lib64/libycp.so.3(_ZN8YSAssign8evaluateEb+0x44)[0x7ff401521b74]
/usr/lib64/libycp.so.3(_ZN6YBlock8evaluateEb+0x1d2)[0x7ff401533f72]
/usr/lib64/libycp.so.3(_ZN13Y2YCPFunction12evaluateCallEv+0x300)[0x7ff401509910]
/usr/lib64/libycp.so.3(_ZN10YEFunction8evaluateEb+0x2df)[0x7ff40150fb8f]
/usr/lib64/libycp.so.3(_ZN9YEBuiltin8evaluateEb+0x52e)[0x7ff40150c44e]
/usr/lib64/libycp.so.3(_ZN6YETerm8evaluateEb+0xde)[0x7ff4015082ce]
/usr/lib64/libycp.so.3(_ZN8YSReturn8evaluateEb+0x45)[0x7ff401521d65]
/usr/lib64/libycp.so.3(_ZN6YBlock8evaluateEb+0x1d2)[0x7ff401533f72]
/usr/lib64/libycp.so.3(_ZN13Y2YCPFunction12evaluateCallEv+0x300)[0x7ff401509910]
/usr/lib64/libycp.so.3(_ZN17YEFunctionPointer8evaluateEb+0x5a6)[0x7ff40150ee26]
/usr/lib64/libycp.so.3(_ZN9YSBracket8evaluateEb+0x61)[0x7ff401527f31]
/usr/lib64/libycp.so.3(_ZN6YBlock8evaluateEb+0x1d2)[0x7ff401533f72]
/usr/lib64/libycp.so.3(_ZN7YSBlock8evaluateEb+0x11)[0x7ff4015211e1]
/usr/lib64/libycp.so.3(_ZN4YSIf8evaluateEb+0x233)[0x7ff401521823]
/usr/lib64/libycp.so.3(_ZN6YBlock8evaluateEb+0x1d2)[0x7ff401533f72]
/usr/lib64/libycp.so.3(_ZN7YSBlock8evaluateEb+0x11)[0x7ff4015211e1]
/usr/lib64/libycp.so.3(_ZN4YSIf8evaluateEb+0x233)[0x7ff401521823]
/usr/lib64/libycp.so.3(_ZN4YSIf8evaluateEb+0x264)[0x7ff401521854]
Comment 4 Thomas Göttlicher 2011-05-26 10:25:00 UTC
It crashes in libycp. Martin, could you please look into it?
Comment 5 Martin Vidner 2011-05-26 12:00:10 UTC
The crashing code is as simple as:
    list<string> ret = nil;
    ret = add (ret, "none");

and it is triggered by 
  any a = 0;
  list<string> ret = [ (string) a];

which produces nil instead of [nil] as I'd expect.
Comment 6 Martin Vidner 2011-05-27 10:46:45 UTC
The two bugs in comment 5 are fixed in yast2-core-2.21.1 
SVN:
 http://svn.opensuse.org/viewcvs/yast?rev=64124&view=rev
 http://svn.opensuse.org/viewcvs/yast?rev=64125&view=rev
OBS Factory SR:
 https://build.opensuse.org/request/show/71665

Now let's find what triggered them. That is really strange, it looks like in Bernhard's logs SCR is really messed up, but I'd need the yast logs from /mnt to find out.

Steffen, are you sure you reproduced the same bug? Can you attach the logs from that?
Comment 7 Steffen Winterfeldt 2011-05-27 11:47:12 UTC
Created attachment 431805 [details]
y2log
Comment 8 Steffen Winterfeldt 2011-05-27 11:47:52 UTC
Created attachment 431807 [details]
signal
Comment 9 Steffen Winterfeldt 2011-05-27 11:51:46 UTC
These are the logs from my last experiments.
Comment 10 Martin Vidner 2011-05-27 12:57:32 UTC
Thanks. That is something different -> bug 696595.

Bernhard, do you still have the logs from your case? If I want to reproduce it, did you use any special settings?
Comment 11 Bernhard Wiedemann 2011-05-27 16:00:12 UTC
This is an autogenerated message for OBS integration:
This bug (694520) was mentioned in
https://build.opensuse.org/request/show/71744 Factory / yast2-core
Comment 12 Bernhard Wiedemann 2011-05-27 16:03:24 UTC
Created attachment 431877 [details]
yast2 logs after another crash

The machine is a Dell T3500. It has 11 partitions with MS-Windows(never booted), 4 Linuxes, 2 VGs and 5 LVs and it needs ~2 seconds to update the yast2 bootloader listing with the new proposal. Bug does not happen, if you wait after triggering first proposal - you will have to cancel and restart yast2 bootloader to have a chance to see the bug.

Steps To Reproduce:
yast2 bootloader
alt-e (Other)
alt-p (Propose New Configuration)
+quickly repeatedly press alt-e (Other) 
 (one would be enough, but it needs to happen at the right time)
press Enter (or select any other option in there - does not matter which)
=> segfaults
Comment 13 Martin Vidner 2011-05-27 16:17:27 UTC
OK, but comment 12 is bug 696595. Sorry, I meant the crash from comment 0, May 18, at installation time (before reboot).
Comment 14 Bernhard Wiedemann 2011-05-28 17:53:39 UTC
Ah, sorry for mixing that up. The machine is the one described in comment 12 anyway, so maybe there is even something left in the yast logs there.
If that and the logs from comment 0 are insufficient, I could try to install 11.4 into the same partition again.

Maybe I did choose minimal install - apart from that and the existing partitioning/installs I did nothing special during install. It popped up an error when trying to install grub (so grub2 from ubuntu was still installed). I told it to retry, error came again. Told it to retry once more, segfaulted.
Comment 15 Martin Vidner 2011-06-27 11:16:37 UTC
Pepa, the crash has been fixed. You may want to find out what went wrong with the bootloader:

In comment 0, y2log at 13:39:12 calls Bootloader_API in the chroot
In comment 12, y2log-6.gz:
2011-05-18 11:39:12 <3> linux(12481) [Interpreter] <stdin>:224 Loading module 'Bootloader_API' failed
Comment 16 Josef Reidinger 2011-06-27 12:52:23 UTC
Hmm, logs there is really useless.
Steffen I found long time ago, that during instal when bootloader do remote call, then logs from perl-Bootloader disappear. It is really annoying as it can contain important information. Maybe we should solve it better then now? ( especially as limal logger looks like deprecated )
Comment 17 Forgotten User xs3PtXj4XH 2011-08-31 13:54:10 UTC
Bernhard, have you tested this against 12.1 at all?  It would be nice to have it fixed in time for release.
Comment 18 Forgotten User xs3PtXj4XH 2011-09-27 22:14:45 UTC
I can NOT reproduce this problem in openSuSE 12.1 Milestone 5 using the steps outlined above.  Can anybody find an alternative way to trigger this, or should the bug be closed?
Comment 19 Bernhard Wiedemann 2011-09-28 13:10:49 UTC
Just did a 12.1 install on the same machine and it did not show this problem.
I would leave the bug open for 11.4 as it did happen there and possible fixes only went to Factory.
Comment 20 Steffen Winterfeldt 2011-10-04 12:58:45 UTC
As it works in 12.1 I'm closing this bug as fixed even though realistically
we won't get a fix for 11.4.
Comment 21 Forgotten User xs3PtXj4XH 2011-10-04 17:59:07 UTC
I agree Steffan.  Thanks for closing.