Bug 294773

Summary: SIGSEGV after multiple calls of ntp-client
Product: [openSUSE] openSUSE 10.3 Reporter: Jiří Suchomel <jsuchome>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: mvidner, ug
Version: Alpha 6   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jiří Suchomel 2007-07-26 14:52:06 UTC
Testing script:

{
    WFM::CallFunction ("ntp-client_auto", ["Read"]);
    WFM::CallFunction ("ntp-client", []);
    WFM::CallFunction ("ntp-client_auto", ["Read"]);
}

result (in the second Read call of _auto):


pure virtual method called
terminate called without an active exception
YaST got signal 6 at YCP file NtpClient.ycp:130
/sbin/yast2: line 385: 10535 Neúspěšně ukončen (SIGABRT)        $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2QT_ARGS

I doubt it is ntp-client specific (-> mvidner) - looks like a problem with the value of NtpClient::AbortFunction (if I comment check for its value, it works).
Comment 1 Martin Vidner 2007-07-26 15:33:00 UTC
Wow, congratulations for discovering a novel way to crash y2base!

The problem is that the second CallFunction sets NtpClient::AbortFunction to a function in that client and then the third CallFunction tries to call it while it is already gone.

Workaround: set AbortFunction back to nil before calling the second Read.

Where does this bug occur? Is the workaround enough?
Comment 2 Jiří Suchomel 2007-07-26 15:39:23 UTC
> Where does this bug occur? 

feature 302192: still WIP, not in svn


Ad Workaround: yes, but I do not have access to the module (that's why I communicate with it via auto client), so I cannot set it from my side (yast2-country). Maybe it could be reset in ntp-client_auto, but that looks scary...
Comment 3 Jiří Suchomel 2007-07-27 05:57:24 UTC
Well, it may be set to nil in ntp-client, just after the value of NtpClient::AbortFunction is not neede: after NtpClient::Read in ReadDialog etc.
Comment 4 Jiří Suchomel 2007-07-27 10:43:58 UTC
AutoYaST IMHO is not affected, since the functions assigning the value of NtpClient::AbortFunction are not called when the "Change" command is called ("Change" is sequence without Read and Write).


Idea: yast2-country can also call only "Change" function from ntp-client_auto instead of calling whole ntp-client module. Reading and writing must be handled from country anyway, because of possibility to only add NTP server without calling the module for more advanced configuration.
Comment 5 Jiří Suchomel 2007-07-27 10:45:15 UTC
Uwe: keyword was mentioned
Comment 6 Jiří Suchomel 2007-07-27 11:39:16 UTC
Fixed (by using "Change" function of ntp-client_auto) in yast2-country-2.15.14.