Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > gnu.bash.bug > #16772

Re: Is this a bug?

From George R Goffe <grgoffe@yahoo.com>
Newsgroups gnu.bash.bug
Subject Re: Is this a bug?
Date 2020-08-18 21:14 +0000
Message-ID <mailman.280.1597785290.2469.bug-bash@gnu.org> (permalink)
References <1361377909.989786.1596736417780.ref@mail.yahoo.com> <1361377909.989786.1596736417780@mail.yahoo.com> <0d88a4ca-9eca-62b4-91bd-d2e4083190f3@case.edu> <1312274972.4025864.1597785278610@mail.yahoo.com>

Show all headers | View raw


Chet,


Please accept my apology for not responding to your email sooner.

I have the bash source from the(?) repository. I followed Dimitris suggestion and found bash hung in a system call named "pselect". I did a grep on the source and found the only two ".c" files using "pselect":

Does this help?

Best regards and thanks for your patience.

George...


lib/readline/input.c:#if defined (HAVE_PSELECT)
lib/readline/input.c:#if defined (HAVE_PSELECT)
lib/readline/input.c:#if defined (HAVE_PSELECT)
lib/readline/input.c:      result = pselect (fileno (stream) + 1, &readfds, NULL, NULL, NULL, &_rl_orig_sigset);
lib/readline/input.c:      result = pselect (fileno (stream) + 1, &readfds, NULL, NULL, NULL, &empty_set);
lib/sh/ufuncs.c:#if defined (HAVE_TIMEVAL) && (defined (HAVE_SELECT) || defined (HAVE_PSELECT))
lib/sh/ufuncs.c:#if defined (HAVE_PSELECT)
lib/sh/ufuncs.c:#if defined (HAVE_PSELECT)
lib/sh/ufuncs.c:#endif /* !HAVE_PSELECT */
lib/sh/ufuncs.c:#if defined (HAVE_PSELECT)
lib/sh/ufuncs.c:      r = pselect(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &ts, &blocked_sigs);Chet,








On Thursday, August 6, 2020, 1:10:42 PM PDT, Chet Ramey <chet.ramey@case.edu> wrote: 





On 8/6/20 1:53 PM, George R Goffe wrote:
> Hi,
> 
> I apologize for bothering you with this question.
> 
> I have several directories on a system with > 300k files. When I use filename completion bash freezes for over a minute depending on the number of files. I'm pretty sure that bash has to read the directory to do the completion but the read appears to be uninterruptible. Is this a bug?

Can you tell what system call bash is executing? Some file systems make
the system call underlying readdir() uninterruptible.

In general, the readline filename completion function that calls readdir
only reads a single directory entry at a time, and returns it to a caller.
If the SIGINT causes readdir to return NULL, the function returns normally.
If readdir returns a valid entry, the caller (e.g., rl_completion_matches)
checks for receipt of a signal. That should be enough to terminate the
directory read.


> Again, I apologize for bothering you with this.


No bother.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
        ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Is this a bug? George R Goffe <grgoffe@yahoo.com> - 2020-08-18 21:14 +0000

csiph-web