Open ianchanning opened 6 years ago
I think this must be specific to Fedora: I am able to build and run without any problems on Ubuntu 16.04 using stack 1.7.1 and ghc 8.2.2, and running against MySQL 5.7.22.
Can you get any further idea what it is trying to do when it fails? To simplify things, you can run the binary stand-alone without yesod devel
- for example run stack exec loot
. On its own, I think that will just produce the "Unexpected: child process exited with ExitFailure (-11)" message, but you can try the same thing with strace
to see if it is getting as far as attempting a database connection - maybe limit it to network calls, as in strace -e trace=network stack exec loot
.
@paul-rouse, ok thanks. I'll have a try tonight.
Commands were pretty fatal:
[ian@localhost loot]$ stack exec loot
Segmentation fault (core dumped)
[ian@localhost loot]$ strace -e trace=network stack exec loot
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=23416, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 23
connect(23, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 23
connect(23, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
socket(AF_UNIX, SOCK_STREAM, 0) = 23
connect(23, {sa_family=AF_UNIX, sun_path="/var/lib/mysql/mysql.sock"}, 110) = 0
setsockopt(23, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
setsockopt(23, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
recvfrom(23, "Y\0\0\0\n5.5.5-10.2.15-MariaDB\0\16\0\0\0s"..., 16384, MSG_DONTWAIT, NULL, NULL) = 93
sendto(23, "\301\0\0\1\214\242\236\0\0\0\0@!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 197, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 197
recvfrom(23, "\20\0\0\2\0\0\0\2@\0\0\0\7\1\5\4loot", 16384, MSG_DONTWAIT, NULL, NULL) = 20
sendto(23, ",\0\0\0\3SET SESSION sql_mode = 'STR"..., 48, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 48
recvfrom(23, 0x351f5f0, 16384, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(23, "\7\0\0\1\0\0\0\2\0\0\0", 16384, MSG_DONTWAIT, NULL, NULL) = 11
setsockopt(23, SOL_SOCKET, SO_RCVTIMEO, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
setsockopt(23, SOL_SOCKET, SO_SNDTIMEO, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
sendto(23, "\21\0\0\0\3SET autocommit=0", 21, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 21
recvfrom(23, "\7\0\0\1\0\0\0\0\0\0\0", 16384, MSG_DONTWAIT, NULL, NULL) = 11
sendto(23, "\22\0\0\0\3start transaction", 22, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 22
recvfrom(23, "\7\0\0\1\0\0\0\1\0\0\0", 16384, MSG_DONTWAIT, NULL, NULL) = 11
sendto(23, "\251\0\0\0\3SELECT COLUMN_NAME, IS_NULL"..., 173, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 173
recvfrom(23, 0x351f5f0, 16384, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(23, "\1\0\0\1\4L\0\0\2\3def\22information_schema"..., 16384, MSG_DONTWAIT, NULL, NULL) = 345
sendto(23, "\362\0\0\0\3SELECT COLUMN_NAME, IS_NULL"..., 246, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 246
recvfrom(23, 0x351f5f0, 16384, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(23, "\1\0\0\1\10L\0\0\2\3def\22information_schema"..., 16384, MSG_DONTWAIT, NULL, NULL) = 707
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x44a6bd84} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)
About the only thing I can tell from that is that it looks like it found the mysql socket ok:
connect(23, {sa_family=AF_UNIX, sun_path="/var/lib/mysql/mysql.sock"}, 110) = 0
I am able to reproduce this now, so I will continue to try to scope it.
I also have this problem (just updated from fedora 26 to 28). My previous problem was with libmysqlclient and it was fixed with (don't know if this helps): ln -s /usr/lib64/libmariadb.so /usr/lib64/libmysqlclient.so.18
I'm getting this error also on Debian unstable
using mariadb
I was investigating this one, I can actually run stack exec <app name>
but when using the devel
server, I was getting ExitFailure (-11)
, I'm hoping there's a better way to debug this.
I appear to be encountering this error on Arch once I'd updated from mariadb 10.1.37 to 10.3.12.
Your OS name and version
Fedora 28
The versions of tools you're using (e.g.
stack
,yesod
ghc
).stack v1.7.1, yesod v1.6, ghc 8.2.2
The versions of dependencies you're using
This is from the
package.yaml
:For your convenience, we recommend pasting this script into bash and uploading the output as a gist...
Output here: https://gist.github.com/ianchanning/c651c1c8435b0423100a47ea36445e4f
Is there anything custom or unusual about your setup? i.e. new or prerelease versions of GHC, stack, etc.
Not that I'm aware of
Finally, if possible, please reproduce the error in a small script
I have listed the commands that I ran below, it is just trying to run the quickstart but for MySQL.
I had installed mariadb:
Created the database:
Here are the commands that I ran and then the error message I get when running
There is also one other user who has seen a similar problem on Fedora 27 on Stack Overflow.