pkoretic/recurse

segfault after app.listen() returns

Closed this issue · 0 comments

a segmentation fault is hit once the app.listen() function exits

shell output (darwin):

./recurse_https 
start listening...
(http) started listening on host QHostAddress(QHostAddress::Any) port 3000
private_key open error: "No such file or directory"
error upon listening: "SSL private key open error"
zsh: segmentation fault  ./recurse_https

dtruss output (darwin):

read_nocancel(0x7, "^{\272\004N\027\225\210\263\r?!7\363\325\002\3779\372\256\222N{\252X\313\261\232\316N^G\030\026\355\f\300v\033B\241\300aD\021s\201}O\020\223\033\317\006\r\221\237L/\330\235o\363\336\213\225\226\235\bt\232w\211\201\rB6\023j\301\231\023\347\037\205+\201}49\351\223\273\2709\223\335rC\220_C96\217\342\005,\367;\351\365\344\242,\227\204\345\024\204zd\021\334M\262\025\217\0", 0x80)        = 128 0
close_nocancel(0x7)      = 0 0
open_nocancel("/dev/random\0", 0x0, 0x0)         = 7 0
read_nocancel(0x7, "-\2645@\034\262\320\022\035\207\0", 0x80)        = 128 0
close_nocancel(0x7)      = 0 0
open("/dev/tty\0", 0x1000000, 0x1FF)         = 7 0
fcntl(0x7, 0x2, 0x1)         = 0 0
close(0x7)       = 0 0
write_nocancel(0x2, "start listening...\n\0", 0x13)      = 19 0
socket(0x1E, 0x1, 0x0)       = 7 0
fcntl(0x7, 0x2, 0x1)         = 0 0
fcntl(0x7, 0x3, 0x0)         = 2 0
fcntl(0x7, 0x4, 0x6)         = 0 0
setsockopt(0x7, 0xFFFF, 0x100)       = 0 0
setsockopt(0x7, 0xFFFF, 0x4)         = 0 0
setsockopt(0x7, 0x29, 0x1B)      = 0 0
bind(0x7, 0x7FFF5B70F550, 0x1C)      = 0 0
getsockname(0x7, 0x7FFF5B70F520, 0x7FFF5B70F51C)         = 0 0
getsockopt(0x7, 0x29, 0x1B)      = 0 0
getpeername(0x7, 0x7FFF5B70F520, 0x7FFF5B70F51C)         = -1 Err#57
getsockopt(0x7, 0xFFFF, 0x1008)      = 0 0
listen(0x7, 0x32, 0x1008)        = 0 0
write_nocancel(0x2, "(http) started listening on host QHostAddress(QHostAddress::Any) port 3000\n\0", 0x4B)      = 75 0
open("./priv.pem\0", 0x1000000, 0x1B6)       = -1 Err#2
write_nocancel(0x2, "private_key open error: \"No such file or directory\"\n\0", 0x34)       = 52 0
write_nocancel(0x2, "error upon listening: \"SSL private key open error\"\n\0", 0x33)        = 51 0
close(0x7)       = 0 0
write(0x5, "\0", 0x1)        = 1 0
workq_kernreturn(0x4, 0x0, 0x0)      = 0 0
kevent_qos(0x3, 0x0, 0x0)        = -1 Err#4
workq_kernreturn(0x4, 0x0, 0x0)      = 0 0
workq_kernreturn(0x4, 0x0, 0x0)      = 0 0

lldb output (darwin):

start listening...
(http) started listening on host QHostAddress(QHostAddress::Any) port 3000
private_key open error: "No such file or directory"
error upon listening: "SSL private key open error"
Process 67004 stopped
* thread #1: tid = 0x1c4fa4, 0x00000001003a7ab4 QtCore`QObjectPrivate::setParent_helper(QObject*) + 52, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1e)
    frame #0: 0x00000001003a7ab4 QtCore`QObjectPrivate::setParent_helper(QObject*) + 52
QtCore`QObjectPrivate::setParent_helper:
->  0x1003a7ab4 <+52>: movq   0x8(%rax), %r12
    0x1003a7ab8 <+56>: movl   0x20(%r12), %r9d
    0x1003a7abd <+61>: andl   $0x8, %r9d
    0x1003a7ac1 <+65>: je     0x1003a7ad5               ; <+85>