Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949222 - net-dialup/minicom-2.9: 2s delay on startup
Summary: net-dialup/minicom-2.9: 2s delay on startup
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-02 10:43 UTC by lekto
Modified: 2025-02-03 00:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,7.57 KB, text/plain)
2025-02-02 10:43 UTC, lekto
Details
strace log (log,35.02 KB, text/plain)
2025-02-02 10:44 UTC, lekto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lekto 2025-02-02 10:43:44 UTC
Created attachment 918079 [details]
emerge --info

Hi, after I've installed Minicom, I noticed about a two-second delay on every start. I've run it with strace and found this:
> clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=2, tv_nsec=0}, 0x7ffcfd081740) = 0
which explains the delay. I started looking into the source code, and I found the delay in src/windiv.c at the 83rd line:
> /*
> * Show an error message.
> */
> void werror(const char *s, ...)
> {
>   WIN *tellwin;
>   va_list ap;
>   va_start(ap, s);
>   tellwin = vmc_tell(s, ap);
>   va_end(ap);
>   sleep(2);
>   mc_wclose(tellwin, 1);
> }
After I've removed sleep(2), the delay disappeared. Looks like there is an error, but Minicom doesn't print any. Before the delay, strace shows that Minicom tried to open locale, but every attempt failed with "ENOENT (No such file or directory)". I don't have this problem on other machine with the same locale. The only differences between these two machine I can think of are OpenRC vs systemd and the device I'm using is /dev/ttyUSB0 vs /dev/ttyACM0 (same USB-RS232 adapter).
Comment 1 lekto 2025-02-02 10:44:15 UTC
Created attachment 918080 [details]
strace log
Comment 2 Mike Gilbert gentoo-dev 2025-02-03 00:48:50 UTC
I think this is the key line from the strace log:

openat(AT_FDCWD, "/var/lock/LCK..ttyACM0", O_WRONLY|O_CREAT|O_EXCL, 0666) = -1 EACCES (Permission denied)

I suspect your user does not have access to create files in /var/lock.