Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#75905 - [rubygems][ruby-did_you_mean] executes several find's over the whole working dir every time
Attached to Project:
Community Packages
Opened by wtf (oi_wtf) - Wednesday, 14 September 2022, 09:21 GMT
Last edited by Andreas Schleifer (Segaja) - Monday, 19 September 2022, 19:04 GMT
Opened by wtf (oi_wtf) - Wednesday, 14 September 2022, 09:21 GMT
Last edited by Andreas Schleifer (Segaja) - Monday, 19 September 2022, 19:04 GMT
|
DetailsDescription:
Since one of the latest updates, every time ruby is run, it runs several find processes whith at least one over the current working dir. If that happens to be /, or a slow disk/network mount, this adds a considerable (and unneccessary?) startup delay. Even when seemingly no special stuff is used (just 'puts' a string, like below). I noticed, since I happen to have dirs inaccessable to the current user in my home, such as a chroot env, for example and the find process reported "Permission denied" errors as seen below. Also a pacman hook that uses ruby and happens to have / as working dir, took a long time and showed errors from find about permission errors in /proc and /run ! -- snip -- (4/4) Checking which packages need to be rebuilt find: ‘./proc/127894/task/127894/net’: Invalid argument find: ‘./proc/127894/net’: Invalid argument find: ‘./run/user/1000/gvfs’: Permission denied find: ‘./run/user/1000/doc’: Permission denied -- snip -- If I comment out the line with the find command in /usr/lib/ruby/gems/3.0.0/specifications/default/did_you_mean-1.6.1.gemspec the problem goes away. No idea if this is an upstream problem or a packaging issue, but since it started after that whole "bundled gems" restructuring, that has happened recently or is still happening (?), I'd guessed I better report this here first. Additional info: * package version(s) % pacman -Q ruby ruby-did_you_mean ruby 3.0.4-14 ruby-did_you_mean 1.6.1-2 Steps to reproduce: % mkdir inaccessible % chmod 000 inaccessible % ruby -e 'puts "foo"' find: ‘./inaccessible’: Permission denied foo % time ruby -e 'puts "foo"' find: ‘./inaccessible’: Permission denied foo user: 2.065 system: 0.292 cpu: 100% total: 2.341 % sudo vim /usr/lib/ruby/gems/3.0.0/specifications/default/did_you_mean-1.6.1.gemspec % time ruby -e 'puts "foo"' foo user: 0.137 system: 0.026 cpu: 98% total: 0.165 % strace -f -e execve ruby -e 'puts "foo"' 2>&1 | grep find [pid 130015] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130016] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git/*", "-printf", "%P\\0"], 0x55e5a7c958f0 /* 55 vars */) = 0 [pid 130017] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130017] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git/*", "-printf", "%P\\0"], 0x55aaf9c1e7a0 /* 55 vars */) = 0 [pid 130018] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130019] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git*", "-printf", "%P\\0"], 0x557a006d48f0 /* 55 vars */) = 0 [pid 130020] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130021] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git/*", "-printf", "%P\\0"], 0x560d4a3f48f0 /* 55 vars */) = 0 [pid 130022] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130023] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git/*", "-printf", "%P\\0"], 0x5566fc93a8f0 /* 55 vars */) = 0 [pid 130024] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130024] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git/*"], 0x560ef9e574f0 /* 55 vars */) = 0 find: ‘./inaccessible’: Permission denied [pid 130031] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130031] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git*", "-printf", "%P\\0"], 0x55e0f67557a0 /* 55 vars */) = 0 [pid 130032] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130032] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git/*", "-printf", "%P\\0"], 0x556c53d047a0 /* 55 vars */) = 0 [pid 130033] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130033] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git/*", "-printf", "%P\\0"], 0x564cc41677a0 /* 55 vars */) = 0 [pid 130034] execve("/bin/sh", ["sh", "-c", "find . -type f -not -path \"*/.gi"...], 0x7ffd3598e558 /* 55 vars */) = 0 [pid 130035] execve("/usr/bin/find", ["find", ".", "-type", "f", "-not", "-path", "*/.git/*", "-printf", "%P\\0"], 0x560a208018f0 /* 55 vars */) = 0 |
This task depends upon
Closed by Andreas Schleifer (Segaja)
Monday, 19 September 2022, 19:04 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in [community-testing]
Monday, 19 September 2022, 19:04 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in [community-testing]