{"action":"created","issue":{"url":"https://api.github.com/repos/diesel-rs/diesel/issues/813","repository_url":"https://api.github.com/repos/diesel-rs/diesel","labels_url":"https://api.github.com/repos/diesel-rs/diesel/issues/813/labels{/name}","comments_url":"https://api.github.com/repos/diesel-rs/diesel/issues/813/comments","events_url":"https://api.github.com/repos/diesel-rs/diesel/issues/813/events","html_url":"https://github.com/diesel-rs/diesel/issues/813","id":215265017,"node_id":"MDU6SXNzdWUyMTUyNjUwMTc=","number":813,"title":"Diesel Segfaults on host, but not development machine","user":{"login":"skeleten","id":1022884,"node_id":"MDQ6VXNlcjEwMjI4ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1022884?v=4","gravatar_id":"","url":"https://api.github.com/users/skeleten","html_url":"https://github.com/skeleten","followers_url":"https://api.github.com/users/skeleten/followers","following_url":"https://api.github.com/users/skeleten/following{/other_user}","gists_url":"https://api.github.com/users/skeleten/gists{/gist_id}","starred_url":"https://api.github.com/users/skeleten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeleten/subscriptions","organizations_url":"https://api.github.com/users/skeleten/orgs","repos_url":"https://api.github.com/users/skeleten/repos","events_url":"https://api.github.com/users/skeleten/events{/privacy}","received_events_url":"https://api.github.com/users/skeleten/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2017-03-19T13:45:53Z","updated_at":"2018-12-10T23:42:34Z","closed_at":"2017-12-16T20:21:22Z","author_association":"NONE","body":"Hello,\r\nI'm in the progress of writing a small discord bot using diesel.\r\nHowever 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).\r\nIt 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`)\r\n\r\nWithin GDB I get the following message for the segfautl: \r\n```\r\nThread 1 \"skellybot\" received signal SIGSEGV, Segmentation fault.\r\n0x0000555555a4d5f7 in je_tcache_dalloc_small (binind=<optimized out>, ptr=0x7ffff1ca5880, tcache=0x7ffff1c0c000, tsd=<optimized out>, slow_path=<optimized out>)\r\nat /checkout/src/liballoc_jemalloc/../jemalloc/include/jemalloc/internal/tcache.h:42\r\n```\r\n\r\n`bt` gives me the following stacktrace: \r\n```\r\n#0  0x0000555555a4d5f7 in je_tcache_dalloc_small (binind=<optimized out>, ptr=0x7ffff1ca5880, tcache=0x7ffff1c0c000, tsd=<optimized out>, slow_path=<optimized out>)\r\n    at /checkout/src/liballoc_jemalloc/../jemalloc/include/jemalloc/internal/tcache.h:422                                                                           \r\n#1  je_arena_dalloc (tcache=0x7ffff1c0c000, ptr=0x7ffff1ca5880, tsd=<optimized out>, slow_path=<optimized out>)\r\n    at /checkout/src/liballoc_jemalloc/../jemalloc/include/jemalloc/internal/arena.h:1370                      \r\n#2  je_idalloctm (is_metadata=false, tcache=0x7ffff1c0c000, ptr=0x7ffff1ca5880, tsd=<optimized out>, slow_path=<optimized out>) at include/jemalloc/internal/jemalloc_internal.h:1055\r\n#3  je_iqalloc (tcache=0x7ffff1c0c000, ptr=0x7ffff1ca5880, tsd=<optimized out>, slow_path=<optimized out>) at include/jemalloc/internal/jemalloc_internal.h:1079\r\n#4  ifree (slow_path=false, tcache=0x7ffff1c0c000, ptr=0x7ffff1ca5880, tsd=<optimized out>) at /checkout/src/liballoc_jemalloc/../jemalloc/src/jemalloc.c:1819\r\n#5  free (ptr=0x7ffff1ca5880) at /checkout/src/liballoc_jemalloc/../jemalloc/src/jemalloc.c:1922\r\n#6  0x00007ffff7bb09d9 in ?? () from /usr/lib/x86_64-linux-gnu/libpq.so.5\r\n#7  0x0000555555627670 in diesel::pg::connection::raw::{{impl}}::drop (self=0x7fffffff92e0)\r\n    at /home/skeleten/.cargo/registry/src/github.com-1ecc6299db9ec823/diesel-0.11.4/src/pg/connection/raw.rs:95\r\n#8  0x00005555555e53e1 in drop::hc00e4affa891dcbd () at /checkout/src/libcore/iter/iterator.rs:139\r\n#9  0x00005555555e4411 in drop::h82bb99e6329dd1c6 () at /checkout/src/libcore/iter/iterator.rs:139\r\n#10 0x000055555560ee02 in skellybot::user_seen (ctx=0x7fffffffb478, uid=0x7fffffffa1c0) at /home/skeleten/Source/skeleten/skellybot/src/main.rs:139\r\n#11 0x000055555560de02 in skellybot::message_create_event (ctx=0x7fffffffb478, msg=Message = {...}) at /home/skeleten/Source/skeleten/skellybot/src/main.rs:113\r\n#12 0x000055555560c7ee in skellybot::run () at /home/skeleten/Source/skeleten/skellybot/src/main.rs:89\r\n#13 0x000055555560b5e7 in skellybot::main () at /home/skeleten/Source/skeleten/skellybot/src/main.rs:32\r\n#14 0x0000555555a44146 in std::panicking::try::do_call<fn(),()> () at /checkout/src/libstd/panicking.rs:454\r\n#15 0x0000555555a4b4fb in panic_unwind::__rust_maybe_catch_panic () at /checkout/src/libpanic_unwind/lib.rs:98\r\n#16 0x0000555555a44bf7 in std::panicking::try<(),fn()> () at /checkout/src/libstd/panicking.rs:433\r\n#17 std::panic::catch_unwind<fn(),()> () at /checkout/src/libstd/panic.rs:361\r\n#18 std::rt::lang_start () at /checkout/src/libstd/rt.rs:57\r\n#19 0x0000555555615fe3 in main ()\r\n```\r\n\r\nThe complete source code I'm runnning can be found under https://github.com/skeleten/skellybot/tree/ece2a04ec61eaa8a1e62ecc3997aa0b7e4e99c6a \r\n\r\nThe Segfaults happens after receiving the first message which is processed here https://github.com/skeleten/skellybot/blob/ece2a04ec61eaa8a1e62ecc3997aa0b7e4e99c6a/src/main.rs#L111"},"comment":{"url":"https://api.github.com/repos/diesel-rs/diesel/issues/comments/446017293","html_url":"https://github.com/diesel-rs/diesel/issues/813#issuecomment-446017293","issue_url":"https://api.github.com/repos/diesel-rs/diesel/issues/813","id":446017293,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjAxNzI5Mw==","user":{"login":"matthewkmayer","id":4998189,"node_id":"MDQ6VXNlcjQ5OTgxODk=","avatar_url":"https://avatars1.githubusercontent.com/u/4998189?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewkmayer","html_url":"https://github.com/matthewkmayer","followers_url":"https://api.github.com/users/matthewkmayer/followers","following_url":"https://api.github.com/users/matthewkmayer/following{/other_user}","gists_url":"https://api.github.com/users/matthewkmayer/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewkmayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewkmayer/subscriptions","organizations_url":"https://api.github.com/users/matthewkmayer/orgs","repos_url":"https://api.github.com/users/matthewkmayer/repos","events_url":"https://api.github.com/users/matthewkmayer/events{/privacy}","received_events_url":"https://api.github.com/users/matthewkmayer/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T23:42:34Z","updated_at":"2018-12-10T23:42:34Z","author_association":"NONE","body":"This looks like an interesting bug!\r\n\r\nLet's try [using `rustls` with 0.35.0 of Rusoto](https://github.com/rusoto/rusoto/tree/master/rusoto/core#usage-with-rustls)). That should remove any use of `openssl` from Rusoto, thus reducing the suspected areas of code. That should let us figure out where this issue should be filed, since it doesn't appear to be a `diesel` issue. 😄 "}}
{"actor":{"display_login":"matthewkmayer"}}