Bug 1302998
Summary: | sudo -i takes 10 seconds | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Marc <marc_vd_meer> |
Component: | sudo | Assignee: | Radovan Sroka <rsroka> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 23 | CC: | chunnayya, dkopecek, kzak, rsroka |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-02-10 13:43:12 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Description
Marc
2016-01-29 09:13:35 UTC
under version-release it should say kernel-4.3.3-303.fc23.x86_64 Hi, can you give me some more information? e.g. content of /etc/nsswitch.conf and sudoers or what name provider you are using and it's configuration and so on... rsroka Hi, note that when I boot back in a kernel 4.2.x sudo -i completes in less than a second. I only see the 10 second wait with kernels 4.3.3 I run a standard desktop version of F23, Xfce DM. selinux disabled. /etc/nsswitch.conf: passwd: files sss shadow: files sss group: files sss hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname mymachines bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files rpc: files services: files sss netgroup: files sss publickey: nisplus automount: files sss aliases: files nisplus /etc/sudoers: Defaults !visiblepw Defaults env_reset Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS" Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE" Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES" Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE" Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY" Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin root ALL=(ALL) ALL %wheel ALL=(ALL) ALL %desktop_admin_r ALL=(ALL) ALL If you can make a strace just put it here. rsroka Created attachment 1119421 [details]
output of sudo strace -r -o trace2.log sudo -i
strace attached
having added exit to /root/.bashrc this is the difference between kernels 4.3.3 and 4.2.8 (and previous) kernel 4.3.3-303.fc23.x86_64: ---------------------------- [marc@marchost ~]$ time sudo -i [sudo] password for marc: real 0m11.618s user 0m0.039s sys 0m0.755s kernel 4.2.8-300.fc23.x86_64: ---------------------------- [marc@marchost ~]$ time sudo -i [sudo] password for marc: real 0m3.307s user 0m0.066s sys 0m0.747s new attachment is output of sudo strace -r -o kernel428sudo.trace sudo -i on kernel 4.2.8. Big difference in timer value of "--- SIGCHLD" Created attachment 1119631 [details]
sudo -i strace on 4.2.8
Hi, strace -f would be helpful because it trace child processes too. Thanks. rsroka Created attachment 1120447 [details]
output of "sudo strace -r -f sudo -i
here you go
Hi, maybe for some more information would be extremely helpful if you use "strace -r -T -ff -o output sudo -i". Thanks. rsroka Created attachment 1120481 [details]
output of "sudo strace -r -T -ff -o sudo.trace sudo -i"
I did some more time commands in kernel 4.3.4 - no difference: [marc@marchost ~]$ time sudo -i real 0m8.840s user 0m0.075s sys 0m0.769s [marc@marchost ~]$ time sudo -i real 0m8.769s user 0m0.057s sys 0m0.764s and redid the same in kernel 4.2.8 to make sure I'm not imagening stuff: [marc@marchost ~]$ time sudo -i real 0m0.081s user 0m0.055s sys 0m0.029s [marc@marchost ~]$ time sudo -i real 0m0.084s user 0m0.056s sys 0m0.032s [marc@marchost ~]$ time sudo -i real 0m0.055s user 0m0.032s sys 0m0.025s A rather huge difference. Created attachment 1121862 [details]
output of "sudo strace -r -T -ff -o sudo428.trace sudo -i"
strace of sudo -i in kernel 4.2.8 for comparison.
Hi, is there any lspci command in your /root/.bashrc? Try "time lspci". It looks like your root shell is executing .bashrc and somewhere in .bashrc is lspci that last too long. rsroka Interesting, no there is no lspci in /root/.bashrc: # .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi set -o vi alias l='ls -la' alias h='ls -lah' alias ltr='ls -ltra' alias htr='ls -ltrah' Indeed lspci takes a lot of time. I will compare this on a pre-kernel 4.3 when I have the time to reboot. [marc@marchost ~]$ time lspci 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06) 00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06) 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04) 00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04) 00:16.2 IDE interface: Intel Corporation 8 Series/C220 Series Chipset Family IDE-r Controller (rev 04) 00:16.3 Serial controller: Intel Corporation 8 Series/C220 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 04) 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4) 00:1c.1 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #2 (rev d4) 00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4) 00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d4) 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation QM87 Express LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04) 01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1) 02:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) 03:00.0 Network controller: Intel Corporation Wireless 7260 (rev 83) real 0m8.741s user 0m0.005s sys 0m0.737s Hi, 8.731063 open("/sys/bus/pci/devices/0000:01:00.0/label", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000067> I think that it's your nvidia which makes a trouble so check the drivers and other related things... But this is definitely not a Sudo bug. rsroka lspci timed on kernel 4.2.8 [marc@marchost ~]$ uname -r 4.2.8-300.fc23.x86_64 [marc@marchost ~]$ time lspci 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06) 00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06) 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04) 00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 8 Series/C220 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 04) 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4) 00:1c.1 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #2 (rev d4) 00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4) 00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d4) 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation QM87 Express LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04) 01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1) 02:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) 03:00.0 Network controller: Intel Corporation Wireless 7260 (rev 83) real 0m0.740s user 0m0.005s sys 0m0.734s Strangely enough lspci on 4.3.x reports an IDE interface, where lspci on 4.2.8 does not? I don't know why lspci is invoked in the first place when doing "sudo -i", it is not in /root/.bashrc, nor is it in /etc/bashrc (In reply to Radovan Sroka from comment #16) > Hi, > > 8.731063 open("/sys/bus/pci/devices/0000:01:00.0/label", O_RDONLY) = -1 > ENOENT (No such file or directory) <0.000067> > > I think that it's your nvidia which makes a trouble so check the drivers and > other related things... > > But this is definitely not a Sudo bug. > > rsroka Agreed, however it is a mystery why strace is issued when doing sudo -i, and why lspci started misbehaving in kernel 4.3 I meant why lspci is issued from sudo -i, sorry Hi Marc, /etc/bashrc executes every script from /etc/profile.d and qt-graphicssystem.sh runs lspci and that lasts too long. rsroka Hi Radovan, Got it. thanks. Opened a bug on pciutils. |