Bug 371976

Summary: Cannot register update repositories from the repository manager module
Product: [openSUSE] openSUSE 11.0 Reporter: Ladislav Slezák <lslezak>
Component: YaST2Assignee: J. Daniel Schmidt <jdsn>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Critical    
Priority: P5 - None CC: Larry.Finger, mvidner
Version: Alpha 2plusFlags: coolo: SHIP_STOPPER-
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2log (with enabled debug)
This is my proposed implementation of the feature.
Test case (small YCP script)

Description Ladislav Slezák 2008-03-18 09:49:49 UTC
This problem was during implementation of feature#302990 (add update repos from the repository manager).

The registration fails because it seems to start another yast instance which cannot acquire the libzypp lock which is already in use.
Comment 1 Ladislav Slezák 2008-03-18 09:51:23 UTC
Created attachment 202725 [details]
y2log (with enabled debug)
Comment 2 Ladislav Slezák 2008-03-18 09:57:52 UTC
The interesting part is here:

2008-03-18 10:52:41 <0> muffin(24002) [libycp] ExecutionEnvironment.cc(pushframe):105 Push frame TimeoutUserInput (200)
2008-03-18 10:52:41 <0> muffin(24078) [liby2] Y2LanguageLoader.cc(Y2LanguageLoader):86 Loading language plugin /usr/lib64/YaST2/plugin/libpy2lang_perl.so
2008-03-18 10:52:41 <0> muffin(24078) [wfm] Y2WFMComponent.cc(Y2WFMComponent):54 Initialized Y2WFMComponent instance
2008-03-18 10:52:41 <1> muffin(24078) [wfm] Y2WFMComponent.cc(SetLanguage):501 GET encoding for en_US:  ISO-8859-1

during UI::TimeoutUserInput(200) is loaded the perl plugin (note the different process ID) and later there is an attempt to acquire the libzypp lock which obviously fails.

The question is why the another WFW component is started? It's strange...
Comment 3 Ladislav Slezák 2008-03-18 09:59:37 UTC
Created attachment 202727 [details]
This is my proposed implementation of the feature.
Comment 4 Ladislav Slezák 2008-03-18 10:00:45 UTC
Created attachment 202728 [details]
Test case (small YCP script)
Comment 5 Ladislav Slezák 2008-03-18 10:05:23 UTC
An interesting thing is that the language plugin has been loaded just at the begining (see the first line in the log):

2008-03-18 10:52:33 <0> muffin(24002) [liby2] Y2LanguageLoader.cc(Y2LanguageLoader):86 Loading language plugin /usr/lib64/YaST2/plugin/libpy2lang_perl.so
2008-03-18 10:52:33 <1> muffin(24002) [liby2] genericfrontend.cc(main):530 Launched YaST2 component 'y2base' 'repositories' 'qt'

I have no idea what happens during registration, is another yast instance started? It doesn't seem so. But why is the language plug-in loaded again in another process? Bug in yast2-core?
Comment 6 Ladislav Slezák 2008-03-18 10:06:36 UTC
I have also tested Alpha3 (build0051) with the same result.
Comment 7 J. Daniel Schmidt 2008-03-20 12:19:46 UTC
(In reply to comment #3 from Ladislav Slezak)
> Created an attachment (id=202727) [details]
> This is my proposed implementation of the feature.

The symbol "`noautoyast" is not recognized by the function Register::suseRegister. Please use the symbol "`autoyast" to run the registration without user interaction.


I will look into the basic issue - I have no idea yet, why another instance is started.
Comment 9 Stephan Kulow 2008-05-21 15:15:07 UTC
I declare this feature "not ship stopper" as we add an update repo now unconditionally during installation, so we can ship without it.
Comment 10 J. Daniel Schmidt 2008-05-21 17:15:18 UTC
(In reply to comment #2 from Ladislav Slezak)
> 
> during UI::TimeoutUserInput(200) is loaded the perl plugin (note the different
> process ID) and later there is an attempt to acquire the libzypp lock which
> obviously fails.
> 
> The question is why the another WFW component is started? It's strange...

Sorry, I can not reproduce this.
The registration does not start a new yast process. It only calls a perl script (/usr/bin/suseRegister).

Could you give me some more hints how to produce this bug?
Comment 11 J. Daniel Schmidt 2008-06-18 14:50:42 UTC
No news, Ladislav? I could not reproduce this bug.

Well, as the update repo is added via the new workflow that are called by the updater applets or via community repositories, there is no real need for this integration.
For Code 11 the registration handling will change anyway - so I close this as WONTFIX.
Comment 12 Ladislav Slezák 2008-06-18 15:54:36 UTC
I just have it tested, it works without any problem, I have merged my proposed patch to SVN trunk although it might be removed in the future. 
Comment 13 J. Daniel Schmidt 2008-06-18 16:29:30 UTC
... so then it is FIXED, right?  :)