mainThe GNU Bourne-Again SHell - Support: sr #109159, Bug: Failed to read initial...

 
 

sr #109159: Bug: Failed to read initial configuration, open() syscall might be interrupted.

Submitter:  Andriy Prystupa <andriyp>
Submitted:  Wed 05 Oct 2016 11:15:23 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 20 Feb 2019 05:22:51 PM UTC, comment #2: 

I believe I've found a condition that can lead to more EINTR returns from open() - Anti-Virus in combination with some fanotify changes I'm testing.

See https://marc.info/?l=linux-fsdevel&m=155006971111600&w=2 for description of the fanotify issues.

With these patches I'm now seeing messages like:

bash: /etc/bash_completion.d/itweb-settings.bash: Interrupted system call

particularly around boot/login.  However, in general I think programs need to be prepared to handle EINTR just about anywhere.

Orion Poplawski <opoplawski>
Sat 31 Dec 2016 09:27:17 PM UTC, comment #1: 

We'll try it provisionally, but there are not supposed to be any circumstances under which a signal will interrupt open(2) from the local file system.  For example, on Linux, open will only return -1/EINTR "[w]hile blocked waiting to complete an open of a slow device".

Chet Ramey <chet>
Group administrator
Wed 05 Oct 2016 11:15:23 AM UTC, original submission:  

Error:
bash: /etc/bash.bashrc: Interrupted system call

Reproduced on bash-4.4 via gnome-terminal or terminator terminal.

Description:

traces attached, issue on line 42065

Correct scenario, P - parent, C - child:
(P) terminator does clone()
(C) SIGWINCH(terminal resized) is configured with SA_RESTART (do not interrupt syscalls on this signal)
(C) execve(/bin/bash)
(P) terminator send SIGWINCH
(C) SIGWINCH handled by bash
(C) bash reconfigures SIGWINCH without SA_RESTART (syscalls will be interrupted)
(C) bash opens bashrc file
Some time parent gets control little bit later, different timing:
(P) terminator does clone()
(C) SIGWINCH(terminal resized) is configured with SA_RESTART (do not interrupt syscalls on this signal)
(C) execve(/bin/bash)
(C) bash reconfigures SIGWINCH without SA_RESTART (syscalls will be interrupted)
(C) bash opens bashrc file (is not finished yet)
(P) terminator send SIGWINCH
(C) SIGWINCH handled by bash and interrupts open(bashrc)
(C) open(bashrc) failed with -EINTR, configuration read failed

Andriy Prystupa <andriyp>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by opoplawski (Posted a comment)
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by andriyp (Submitted the item)
  • -email is unavailable- added by andriyp
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-31 chet StatusNone Done
    2016-10-05 andriyp Carbon-Copy- Added andriyp

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code