bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug: Failed to read initial configuration, open() syscall might be inter


From: Andriy Prystupa
Subject: Bug: Failed to read initial configuration, open() syscall might be interrupted.
Date: Wed, 5 Oct 2016 16:04:44 +0300

Hi, 


Error: 

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

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

Traces attached, issue is at line 42065


Here is short analyze of bug.

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

Best Regards,
--

Andriy Prystupa | SW Engineer
GlobalLogic
M +38.097.330.9412  S 
prandriy
www.globallogic.com

http://www.globallogic.com/email_disclaimer.txt



--

Andriy Prystupa | SW Engineer
GlobalLogic
M +38.097.330.9412  S 
prandriy
www.globallogic.com

http://www.globallogic.com/email_disclaimer.txt

Attachment: traces.tar.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]