Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDiesel Segfaults on host, but not development machine #813
Comments
This comment has been minimized.
|
I'm really bad at debugging stuff like this, so all I can offer is a bunch of links to source code. In your stacktrace, I see the following line from diesel
which is this code:
(Of course the segfault is in unsafe code!) Looking further, it seems that this drop is called at the end of the |
This comment has been minimized.
skeleten
commented
Mar 19, 2017
|
The intrigung part in my opinion is, that |
This comment has been minimized.
|
Are you compiling on the host itself, or from your development machine? Can you confirm that the versions of libpq are the same? |
This comment has been minimized.
skeleten
commented
Mar 19, 2017
|
It seems my development machine is using
while on my host machine it is |
This comment has been minimized.
|
Are you compiling on the host or target? (I don't think that should cause a segfault, but good to rule out) |
This comment has been minimized.
|
Also do you know whether the connection actually successfully established or not? Can you check if |
This comment has been minimized.
skeleten
commented
Mar 19, 2017
|
I'm compiling on my development macheni (as server does not seem to have the resources needed to compile the crate) |
This comment has been minimized.
skeleten
commented
Mar 19, 2017
|
Stepping through the function with GDB implies its establishing the connection successfully (it does not return early) |
This comment has been minimized.
|
Can you try statically linking libpq? ( |
This comment has been minimized.
skeleten
commented
Mar 19, 2017
|
It seems it won't let me compile on my Arch machine
This also happens under a OpenSUSE WSL. |
This comment has been minimized.
skeleten
commented
Mar 19, 2017
|
I updated the postgres version on my host to |
This comment has been minimized.
|
Thanks. You've given me information to reproduce, so I will try to look into it (to be honest though I don't have any ideas). The only thing I can think to try is to compile on your host machine. |
This comment has been minimized.
skeleten
commented
Mar 19, 2017
|
Trying to compile on my host machine literally runs out of memory :( Maybe I'll upscale it for a bit to try out, though |
This comment has been minimized.
skeleten
commented
Mar 19, 2017
•
|
I did upsize the droplet to be able to actually compile it on the host; it still shows the same behaviour though. |
This comment has been minimized.
|
Closing as this issue has been stale for a while, and there's still nothing actionable we can do. If this issue is still occurring or you can provide additional information, let me know and I'll reopen. |
sgrif
closed this
Dec 16, 2017
This comment has been minimized.
gnmerritt
commented
Nov 5, 2018
|
I'm seeing what appears to be a similar segfault when running Happy to try and help run this down, please let me know what additional information I can provide. diesel
example failing job on travis: https://travis-ci.org/otterandrye/photothing-api/jobs/449963414 |
This comment has been minimized.
gnmerritt
commented
Nov 5, 2018
|
there's nothing helpful in the DB logs either, just seeing the connections drop when the test binary segfaults:
|
skeleten commentedMar 19, 2017
•
edited
Hello,
I'm in the progress of writing a small discord bot using diesel.
However my application seems to receive a segfault on my VPS host (
uname -a:Linux ubuntu-512mb-fra1-01 4.4.0-67-generic #88-Ubuntu SMP Wed Mar 8 16:34:45 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux; its the smallest size of an digitalocean droplet).It does not do so on my development machine (
uname -a:Linux charon 4.10.2-1-ARCH #1 SMP PREEMPT Mon Mar 13 17:13:41 CET 2017 x86_64 GNU/Linux)Within GDB I get the following message for the segfautl:
btgives me the following stacktrace:The complete source code I'm runnning can be found under https://github.com/skeleten/skellybot/tree/ece2a04ec61eaa8a1e62ecc3997aa0b7e4e99c6a
The Segfaults happens after receiving the first message which is processed here https://github.com/skeleten/skellybot/blob/ece2a04ec61eaa8a1e62ecc3997aa0b7e4e99c6a/src/main.rs#L111