Bug 1257471 - completely unresponsive REPL loop
Summary: completely unresponsive REPL loop
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: qepcad-B
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-27 07:18 UTC by Przemek Klosowski
Modified: 2015-09-18 19:43 UTC (History)
1 user (show)

Fixed In Version: 1.69-11.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-13 00:48:57 UTC


Attachments (Terms of Use)

Description Przemek Klosowski 2015-08-27 07:18:54 UTC
Description of problem:
completely unresponsive, fails to read input, internal infinite signal loop

Version-Release number of selected component (if applicable):
qepcad-B-1.69-8.fc22.x86_64


How reproducible:   every time

Steps to Reproduce:
1. run qepcad
2. type a single character, e.g. '[' in response to the promptb

Actual results:
prints out the initial REPL messages and prompt, waits for input, accepts single typed character, becomes unresponsive

Expected results: 
properly accepts and processes input


Additional info:
Seems to get stuck in a signal loop after echoing the input:
[pid  6600] <... read resumed> "[", 1)  = 1
[pid  6600] write(1, "[", 1[)            = 1
[pid  6600] read(0, 0x7ffeb438c227, 1)  = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
[pid  6600] --- SIGTTIN {si_signo=SIGTTIN, si_code=SI_KERNEL, si_value={int=0, ptr=0x5455203600000000}} ---
[pid  6600] rt_sigreturn({mask=[]})     = -1 EINTR (Interrupted system call)
[pid  6600] ioctl(1, TCXONC, TCOON)     = -1 ENOTTY (Inappropriate ioctl for device)
[pid  6600] ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
[pid  6600] --- SIGTTOU {si_signo=SIGTTOU, si_code=SI_KERNEL, si_value={int=0, ptr=0x5455203600000000}} ---
[pid  6600] rt_sigreturn({mask=[]})     = -1 EINTR (Interrupted system call)
[pid  6600] ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
[pid  6600] --- SIGTTOU {si_signo=SIGTTOU, si_code=SI_KERNEL, si_value={int=0, ptr=0x5455203600000000}} ---
[pid  6600] rt_sigreturn({mask=[]})     = -1 EINTR (Interrupted system call)

Comment 1 Jerry James 2015-08-28 03:06:25 UTC
Yes, I can reproduce this.  It used to work in Fedora 21, but probably by accident, because I see this in the build output:

In file included from io/CREAD.c:22:0:
./db/readlineistream.h: In constructor 'readlineIstream::readlineIstream()':
./db/readlineistream.h:29:18: warning: 'readlineIstream::buff' will be initialized after [-Wreorder]
   readlineInBuff buff;
                  ^
./db/readlineistream.h:31:51: warning:   base 'std::basic_istream<char>' [-Wreorder]
   inline readlineIstream() : buff(), istream(&buff) { }
                                                   ^
./db/readlineistream.h:31:10: warning:   when initialized here [-Wreorder]
   inline readlineIstream() : buff(), istream(&buff) { }
          ^
./db/readlineistream.h: In constructor 'readlineIstream::readlineIstream(int)':
./db/readlineistream.h:29:18: warning: 'readlineIstream::buff' will be initialized after [-Wreorder]
   readlineInBuff buff;
                  ^
./db/readlineistream.h:32:59: warning:   base 'std::basic_istream<char>' [-Wreorder]
   inline readlineIstream(int fd) : buff(fd), istream(&buff) { }
                                                           ^
./db/readlineistream.h:32:10: warning:   when initialized here [-Wreorder]
   inline readlineIstream(int fd) : buff(fd), istream(&buff) { }
          ^
In file included from io/CREAD.c:23:0:
./db/convenientstreams.h: In constructor 'slwcistream::slwcistream(std::istream&, slwcistream::option)':
./db/convenientstreams.h:47:23: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     }while(c = in.get());
                       ^
In file included from io/CREAD.c:23:0:
./db/convenientstreams.h: In constructor 'cacIstream::cacIstream(std::istream&)':
./db/convenientstreams.h:74:13: warning: 'cacIstream::buff' will be initialized after [-Wreorder]
   cacInBuff buff;
             ^
./db/convenientstreams.h:76:54: warning:   base 'std::basic_istream<char>' [-Wreorder]
   cacIstream(istream &_in) : buff(_in), istream(&buff) { }
                                                      ^
./db/convenientstreams.h:76:3: warning:   when initialized here [-Wreorder]
   cacIstream(istream &_in) : buff(_in), istream(&buff) { }
   ^

In other words, the C++ stream objects are being initialized with uninitialized streambuf objects.  This will take a little coding work to fix.  I'll try to have a solution soon.

Comment 2 Fedora Update System 2015-09-04 03:10:39 UTC
qepcad-B-1.69-11.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15046

Comment 3 Fedora Update System 2015-09-04 23:20:40 UTC
qepcad-B-1.69-11.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update qepcad-B'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15045

Comment 4 Fedora Update System 2015-09-04 23:22:43 UTC
qepcad-B-1.69-11.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update qepcad-B'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15046

Comment 5 Fedora Update System 2015-09-13 00:48:56 UTC
qepcad-B-1.69-11.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-09-18 18:36:30 UTC
qepcad-B-1.69-11.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Przemek Klosowski 2015-09-18 19:43:48 UTC
OP, confirming that the problem is fixed by the patch


Note You need to log in before you can comment on or make changes to this bug.