Bug 927 - sudo 1.9.0 on AIX: Terminal input/output very sluggish when "log_output" is enabled
sudo 1.9.0 on AIX: Terminal input/output very sluggish when "log_output" is e...
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.9.0
IBM AIX
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-12 08:09 MDT by altmark
Modified: 2020-06-19 06:00 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description altmark 2020-05-12 08:09:17 MDT
After updating to sudo 1.9.0 today, I found that the terminal input and output within a new session is very sluggish.

The characters I type appear with a noticable delay on the screen and sometimes a command's output does not show up after the first press of the <Return> key, only after 2-3 more keypress events or even when entering the next command.

This seems to be related to I/O logging, since the issue is gone when I comment or remove the

  Defaults log_output

line in /etc/sudoers.

I've tried the RPM package for AIX 7.1 and above from https://www.sudo.ws/download.html#binary as well as building sudo from source myself - same behaviour.

Also ran it on different systems, one with AIX 7100-05-05, the other with AIX 7200-04-01. The problem occurs on both.
Comment 1 Todd C. Miller 2020-05-12 08:20:39 MDT
What version of sudo were you running previously?
Comment 2 altmark 2020-05-12 08:29:10 MDT
Sorry, should have noted that. I've updated from 1.8.31p1 which was working fine. The configuration files have been unchanged.
Comment 3 Todd C. Miller 2020-05-12 09:07:21 MDT
sudo 1.9.0 will use the cfmakeraw() function to set the pty to raw mode if it is available.  This function exists on AIX but is not documented and it doesn't seem to work the same was as it does on other systems.  If you pass ac_cv_func_cfmakeraw=no to the configure script it will avoid using it and the behavior will be the same as with sudo 1.8.31p1.
Comment 4 altmark 2020-05-12 09:10:49 MDT
Ok, thank you! I'll give it a try and let you know.
Comment 5 altmark 2020-05-12 09:26:14 MDT
That fixed it. Thanks a lot for the quick help, Todd!
Comment 6 Todd C. Miller 2020-05-12 09:33:10 MDT
I've also rebuilt my AIX packages with that fix.
Comment 7 altmark 2020-05-12 09:40:14 MDT
Yep, they work for me, too. Thank you!
Comment 8 Todd C. Miller 2020-05-12 09:48:26 MDT
In case you are interested, the problem is that cfmakeraw() on AIX doesn't set VMIN to 1 or VTIME to 0 in c_cc in struct termios.  It also doesn't clear the CSIZE and PARENB flags from c_cflag but that's not as much of a problem.
Comment 9 altmark 2020-05-12 09:55:50 MDT
Yeah, unfortunately some of the functions in AIX don't seem to have the exact same behavior as their Linux counterparts of same name. Glad you knew right where to look and provided a fix so quickly. Thanks again and feel free to close this bug report.
Comment 10 Todd C. Miller 2020-06-19 06:00:35 MDT
Fixed in sudo 1.9.1