Bug 129679

Summary: Problem in runleveleditor at entry CRON
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Henk Weebers <h.weebers>
Component: YaST2Assignee: Lukas Ocilka <locilka>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P5 - None CC: axel.braun, coolo, locilka, mvidner
Version: Final   
Target Milestone: ---   
Hardware: 32bit   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Patch fixing the speed problem
this is y2 log capturing actions from runleveleditor

Description Henk Weebers 2005-10-20 11:13:17 UTC
Runlevels can be changed by usung runlevel editor. It looks u alle available  
services and looks up th runnig state. Only it stucs at cron when it is  
running. By putting down: "rccron stop" and then running the runlevel editor, 
all states are found. At cron, the state is still reported as "on*".
Comment 1 Mads Martin Joergensen 2005-10-20 11:57:41 UTC
Well, the init script reports correctly, so this probably is an issue with the
runlevel editor of yast.
Comment 2 Michael Radziej 2005-10-20 13:55:43 UTC
Can you please attach the /var/log/YaST2 directory (as a tar file)?
Please take a look at http://www.opensuse.org/Bug_Reporting_FAQ#YaST
if you have any problems.
Comment 3 Lukas Ocilka 2005-10-24 13:43:28 UTC
I would really appreciate having those log files.
Thanks
Comment 4 Lukas Ocilka 2005-11-01 12:50:25 UTC
_It seems there are two bugs reported_:

1st: Runlevel editor stucks when checking the "cron" service
2nd: Runlevel editor reports cron "on*" although it is stopped

_Explanation of these bugs_:

1st: Runlevel editor checks many services in the alphabetical order, however if you use the Simple Mode, there are many services between autoyast and cron hidden (see the Expert Mode), these services have to be checked too and it seems that the program stucked.

2nd: This is a small missunderstanding. There is on "on/off*" but Enabled:Yes/No, which means whether the service is enabled in the boot scripts. See the help on the left side: An asterisk (*) after a service status means that the service is enabled but not running or is disabled but running now.

_Solution_:
1st: I'll try to speed it up.
2nd: There's nothing to fix...
Comment 5 Lukas Ocilka 2005-11-01 14:05:44 UTC
Created attachment 56125 [details]
Patch fixing the speed problem

This is a patch which should fix the speed problem. Runlevel editor checks services which are listed in the table and skips which aren't.

If you switch the `simple / `expert mode, it should reread services which were not checked.

Please, try this patch if you like to, with commands:
cd /usr/share/YaST2/include/runlevel;
patch < $whereis_the_file/runlevel_patch_129679.diff

It should be much more faster now....
Comment 6 Lukas Ocilka 2005-11-01 14:11:02 UTC
Fixed in SVN, It will go to the next release AlphaX of SuSE Linux 10.1.
Comment 7 Lukas Ocilka 2005-11-04 11:45:32 UTC
*** Bug 132211 has been marked as a duplicate of this bug. ***
Comment 8 Axel Braun 2005-11-10 10:10:06 UTC
The a.m. patch was tested, but it still hangs on some runlevel elements *and* it does not respond to mouse-clicks anymore.
Comment 9 Lukas Ocilka 2005-11-10 10:14:20 UTC
On which ones does it hang? Do they respond properly in your system?
For instance for "cron" command: `/etc/init.d/cron status` etc.

Do you have YaST logs?
Is it allways reproducible?
Comment 10 Axel Braun 2005-11-10 10:20:13 UTC
Yes, up to now it is always reproducable. This is the end of the log, please note the time until I killed the process!

2005-11-10 10:03:41 <1> southpole(6701) [ui-shortcuts] YShortcutManager.cc(checkShortcuts):82 Shortcut conflict: 'E' used for YRadioButton "&Einfacher Modus"
2005-11-10 10:03:41 <1> southpole(6701) [ui-shortcuts] YShortcutManager.cc(checkShortcuts):82 Shortcut conflict: 'E' used for YRadioButton "&Expertenmodus"
2005-11-10 10:03:41 <1> southpole(6701) [ui-shortcuts] YShortcutManager.cc(checkShortcuts):82 Shortcut conflict: 'S' used for YComboBox "&Standard-Runlevel nach dem Systemstart setzen auf:"
2005-11-10 10:03:41 <1> southpole(6701) [ui-shortcuts] YShortcutManager.cc(checkShortcuts):82 Shortcut conflict: 'B' used for YCheckBox "&B"
2005-11-10 10:03:41 <1> southpole(6701) [ui-shortcuts] YShortcutManager.cc(checkShortcuts):82 Shortcut conflict: 'S' used for YCheckBox "&S"
2005-11-10 10:03:41 <1> southpole(6701) [ui-shortcuts] YShortcutManager.cc(checkShortcuts):82 Shortcut conflict: 'S' used for YMenuButton "&Starten/Anhalten/Aktualisieren"
2005-11-10 10:03:41 <1> southpole(6701) [ui-shortcuts] YShortcutManager.cc(checkShortcuts):82 Shortcut conflict: 'Z' used for YMenuButton "Anwenden/&Zurücksetzen"
2005-11-10 10:03:41 <1> southpole(6701) [ui-shortcuts] YShortcutManager.cc(checkShortcuts):82 Shortcut conflict: 'Z' used for YQWizardButton "&Zurück"
2005-11-10 10:03:41 <1> southpole(6701) [ui-shortcuts] YShortcutManager.cc(checkShortcuts):82 Shortcut conflict: 'B' used for YQWizardButton "&Beenden"
2005-11-10 10:03:41 <1> southpole(6701) [qt-ui] YQCheckBox.cc(stateChanged):151 old: 2; new: 2
2005-11-10 10:03:41 <1> southpole(6701) [qt-ui] YQCheckBox.cc(stateChanged):151 old: 2; new: 2
2005-11-10 10:03:41 <1> southpole(6701) [YCP] Service.ycp:277 Running service initscript SuSEfirewall2_init status
2005-11-10 10:03:41 <1> southpole(6701) [YCP] Service.ycp:277 Running service initscript boot.cleanup status
2005-11-10 10:03:41 <1> southpole(6701) [YCP] Service.ycp:277 Running service initscript boot.clock status
2005-11-10 10:03:41 <1> southpole(6701) [YCP] Service.ycp:277 Running service initscript boot.coldplug status
2005-11-10 10:03:41 <3> southpole(6701) [bash] ShellCommand.cc(shellcommand):78 ..dead
2005-11-10 10:03:41 <1> southpole(6701) [YCP] Service.ycp:277 Running service initscript boot.crypto status
2005-11-10 10:03:41 <1> southpole(6701) [YCP] Service.ycp:277 Running service initscript boot.device-mapper status
2005-11-10 10:03:41 <1> southpole(6701) [YCP] Service.ycp:277 Running service initscript boot.idedma status
2005-11-10 10:55:18 <2> southpole(6701) [qt-ui] YQUI_core.cc(qMessageHandler):640 qt-warning: qt: Fatal IO error: client killed
Comment 11 Lukas Ocilka 2005-11-10 10:27:44 UTC
Your last service checked was 'boot.idedma', could you, please check commands:

/etc/init.d/boot.idedma status
/etc/init.d/boot.ipconfig status
/etc/init.d/boot.isapnp status

Or if you have other service after the boot.idedma - alphabetically sorted in the /etc/init.d/ directory.
Comment 12 Axel Braun 2005-11-10 10:47:51 UTC
looks like the boot.idedma hangs at the CD-Writer:

southpole:/home/axel # /etc/init.d/boot.idedma status
IDE DMA mode status:

/dev/hda:
 using_dma    =  1 (on)

/dev/hdc:
 using_dma    =  1 (on)

<here it hangs>

Hardware:
Probing IDE interface ide0...
hda: HDS722540VLAT20, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: max request size: 1024KiB
hda: 80418240 sectors (41174 MB) w/1794KiB Cache, CHS=16383/255/63, UDMA(100)
hda: cache flushes supported
 hda: hda1 hda2 hda3 hda4
Probing IDE interface ide1...
hdc: ATAPI DVD-ROM 16XMax, ATAPI CD/DVD-ROM drive
hdd: ATAPI CD-RW 52XMax, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
ACPI: CPU0 (power states: C1[C1])
hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
hdd: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)

Comment 13 Lukas Ocilka 2005-11-10 10:58:54 UTC
In this case, it seems, that the problem lies in the /etc/init.d/boot.idedma script or somewhere below this layer. Author of the script is: lslezak. See the comment #11 and the comment #12.

Axel: thanks for your testings so far.

Mvidner: We could think about using background-agent (with timeout) for Service.ycp - for checking services to prevent from getting stucked. What do you think? (I'd be able to do that).
Comment 14 Martin Vidner 2005-11-10 11:30:05 UTC
(In reply to comment #13)
It would be useful for the runlevel editor.
However we would have to be extra careful if we wanted to replace existing Service::* functions. The interface would have to remain the same and you must not forget the other usage modes: autoyast and CLI.
Comment 15 Ladislav Slezák 2005-11-10 11:36:48 UTC
Axel, could you attach output of 'hdparm -d /dev/hdd' command? If it hangs it's HW or kernel bug...
Comment 16 Axel Braun 2005-11-10 12:26:16 UTC
Indeed it was hanging when I tried first time, I could also not access the CD-writer. After a reboot it worked normal - also the runlevel editor. On the other hand, I was not using the CD today, as long as the PC was turned on.
Comment 17 Henk Weebers 2005-11-10 20:06:36 UTC
Created attachment 57005 [details]
this is y2 log capturing actions from runleveleditor

I started runlevel and at corn it halts for about 3 minutes.

Here is my y2log.
Comment 18 Lukas Ocilka 2005-11-10 21:21:05 UTC
That seems to be yet another problem in yet another script, see:

2005-11-10 20:49:04 <1> centraal(23958) [YCP] Service.ycp:277 Running service initscript boot.preload_early status
2005-11-10 20:52:07 <3> centraal(23958) [ui] YTable.cc(itemWithId):258 Table: No item "boot.preload_early" existing

I'd guess that running the `/etc/init.d/boot.preload_early status` command stucked the system for 3 minutes. Henk, could you, please, confirm that by running the command on your console?

(The error message 'Table: No item "boot.preload_early" existing' only says that there is no such item in the table. That's fixes my patch in comment #5)
Comment 19 Henk Weebers 2005-11-10 22:40:54 UTC
He, That worked!
I'll implement patch from comment #5.

Thanks,
Henk
Comment 20 Lukas Ocilka 2005-11-11 08:38:44 UTC
Yes, sure, that worked because this patch prevents simple runlevel configuration from reading unseen services, but expert configuration would get stucked either. Because it calls the script `/etc/init.d/boot.preload_early status` which probably hangs.

Could you try to run that script please?
Comment 21 Martin Vidner 2005-11-11 08:50:23 UTC
/etc/init.d/boot.preload_early unconditionally calls /usr/bin/update_preload, which does not hang but takes a long time.
That also explains why the preloading is done also at shutdown... yuck.
Comment 22 Stephan Kulow 2005-11-11 09:06:07 UTC
the update_preload only does something if the package database changed. But if that's the only remaining bug here, then this is a duplicate of 117023
Comment 23 Ladislav Slezák 2005-11-11 14:14:59 UTC
Summary: hdparm hang in comment #12 is WORKSFORME (see comment #16), the preload problem is duplicate of bug #117023.

The only thing which remains is to protect yast from hanging - use the background agent (comment #13).
Comment 24 Lukas Ocilka 2005-11-11 14:24:34 UTC
Author of the Service.ycp is mvidner@suse.de, he should decide about using .background agent for that.

On the other hand I could implement it myself then ;)
Comment 25 Axel Braun 2005-11-11 14:28:40 UTC
Maybe OT, but related to comment #12: Device hdd produces error messages like

kernel: hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
kernel: hdd: packet command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
kernel: ide: failed opcode was: unknown

even if the drive is not in use. Is this a kernel issue? I'm running 2.6.13-15.ck6.SUPER.1-default
Comment 26 Martin Vidner 2005-11-11 15:49:31 UTC
I suggest not to touch service (at least initially) and use the background agent only for RLE.
Comment 27 Lukas Ocilka 2005-11-16 07:35:52 UTC
Axel: this might not be OT but I just don't know.

Leaving as enhancement: Change Runlevel Editor to check services with the .backgroud agent with timeout.
Comment 28 Lukas Ocilka 2005-12-15 14:37:58 UTC
Stano, what do you think of this enhancement?

yast2-runlevel needs to implement its own function (duplicate for Service.ycp) checking whether the service is running or not - using the background agent with a timeout.
Comment 29 Stanislav Visnovsky 2005-12-15 14:41:11 UTC
Agreed.
Comment 30 Henk Weebers 2005-12-16 08:00:26 UTC
Please, remove me from the CC list. (BTW I don't know where to do that)
Comment 33 Lukas Ocilka 2005-12-16 08:54:34 UTC
Removing reporters mail.
Comment 36 Lukas Ocilka 2006-01-05 09:29:34 UTC
Fixing in SVN for 10.1
Added a new function with time-out after 60 sec.
Runlevel Editor shouldn't stuck now (just for that mentioned 60 sec as maximum ;)).