{"action":"opened","issue":{"url":"https://api.github.com/repos/tmux/tmux/issues/688","repository_url":"https://api.github.com/repos/tmux/tmux","labels_url":"https://api.github.com/repos/tmux/tmux/issues/688/labels{/name}","comments_url":"https://api.github.com/repos/tmux/tmux/issues/688/comments","events_url":"https://api.github.com/repos/tmux/tmux/issues/688/events","html_url":"https://github.com/tmux/tmux/issues/688","id":195069374,"number":688,"title":"tmux server crash when closing windows (OSX, tmux-2.3 via MacPorts)","user":{"login":"reynhout","id":2137,"avatar_url":"https://avatars.githubusercontent.com/u/2137?v=3","gravatar_id":"","url":"https://api.github.com/users/reynhout","html_url":"https://github.com/reynhout","followers_url":"https://api.github.com/users/reynhout/followers","following_url":"https://api.github.com/users/reynhout/following{/other_user}","gists_url":"https://api.github.com/users/reynhout/gists{/gist_id}","starred_url":"https://api.github.com/users/reynhout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reynhout/subscriptions","organizations_url":"https://api.github.com/users/reynhout/orgs","repos_url":"https://api.github.com/users/reynhout/repos","events_url":"https://api.github.com/users/reynhout/events{/privacy}","received_events_url":"https://api.github.com/users/reynhout/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-12T19:54:39Z","updated_at":"2016-12-12T19:54:39Z","closed_at":null,"body":"This has happened to me four times in the last eight days. I have enclosed some excerpted crashlogs. Most of the occurrences were when closing a few windows at a time, I think always closing an ssh connection on the way.\r\n\r\n```\r\nException Type:        EXC_CRASH (SIGABRT)\r\n\r\nApplication Specific Information:\r\ncrashed on child side of fork pre-exec\r\n*** error for object 0x7f898bd07900: pointer being freed was not allocated\r\n\r\nThread 0 Crashed:: Dispatch queue: com.apple.main-thread\r\n0   libsystem_kernel.dylib        \t0x00007fff90fd0f06 __pthread_kill + 10\r\n1   libsystem_pthread.dylib       \t0x00007fff92fb04ec pthread_kill + 90\r\n2   libsystem_c.dylib             \t0x00007fff9a91d6df abort + 129\r\n3   libsystem_malloc.dylib        \t0x00007fff96d7d041 free + 425\r\n4   tmux                          \t0x00000001041e23bc status_message_set + 556\r\n5   tmux                          \t0x00000001041ab329 alerts_check_activity + 297\r\n6   tmux                          \t0x00000001041aaefa alerts_callback + 202\r\n7   libevent-2.0.5.dylib          \t0x00000001042310ec event_once_cb + 22\r\n8   libevent-2.0.5.dylib          \t0x00000001042309c2 event_base_loop + 1643\r\n```\r\n\r\n```\r\nException Type:        EXC_CRASH (SIGABRT)\r\n\r\nApplication Specific Information:\r\ncrashed on child side of fork pre-exec\r\n*** error for object 0x7fb25964b0a0: incorrect checksum for freed object - object was probably modified after being freed.\r\n \r\nThread 0 Crashed:: Dispatch queue: com.apple.main-thread\r\n0   libsystem_kernel.dylib        \t0x00007fff90fd0f06 __pthread_kill + 10\r\n1   libsystem_pthread.dylib       \t0x00007fff92fb04ec pthread_kill + 90\r\n2   libsystem_c.dylib             \t0x00007fff9a91d6df abort + 129\r\n3   libsystem_malloc.dylib        \t0x00007fff96d89396 szone_error + 626\r\n4   libsystem_malloc.dylib        \t0x00007fff96d7f5f4 tiny_free_list_remove_ptr + 289\r\n5   libsystem_malloc.dylib        \t0x00007fff96d7df94 szone_free_definite_size + 3094\r\n6   tmux                          \t0x000000010c846a72 screen_free + 18\r\n7   tmux                          \t0x000000010c865611 window_pane_destroy + 129\r\n8   tmux                          \t0x000000010c84a412 server_destroy_pane + 370\r\n9   libevent-2.0.5.dylib          \t0x000000010c8aa309 bufferevent_readcb + 298\r\n10  libevent-2.0.5.dylib          \t0x000000010c8a0aa6 event_base_loop + 1871\r\n```\r\n\r\nThis last one was a bit different; I wasn't closing windows, I think I was just switching between them. Apologies if it's not related -- I've never seen a tmux crash before, in almost eight years of use. \r\n\r\n```\r\nException Type:        EXC_BAD_ACCESS (SIGSEGV)\r\nException Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008\r\n\r\nVM Regions Near 0x8:\r\n--> \r\n    __TEXT                 000000010cc60000-000000010ccbf000 [  380K] r-x/rwx SM=COW  /opt/local/bin/tmux\r\n\r\nApplication Specific Information:\r\ncrashed on child side of fork pre-exec\r\n\r\nThread 0 Crashed:: Dispatch queue: com.apple.main-thread\r\n0   tmux                          \t0x000000010ccadc94 winlink_set_window + 4\r\n1   tmux                          \t0x000000010cc97a19 session_group_synchronize1 + 249\r\n2   tmux                          \t0x000000010cc96950 session_new + 512\r\n3   tmux                          \t0x000000010cc6d71e cmd_new_window_exec + 702\r\n4   tmux                          \t0x000000010cc6e670 cmdq_continue + 576\r\n5   tmux                          \t0x000000010cc92559 server_client_handle_key + 969\r\n6   tmux                          \t0x000000010cc9cc26 tty_keys_next + 1702\r\n7   tmux                          \t0x000000010cc9e3e8 tty_read_callback + 24\r\n8   libevent-2.0.5.dylib          \t0x000000010ccf32ef bufferevent_readcb + 272\r\n9   libevent-2.0.5.dylib          \t0x000000010cce9aa6 event_base_loop + 1871\r\n```\r\n\r\nIn all cases, the server crashed for all running sessions across a few groups.\r\n\r\nI found a previous similar report in #481 . Some differences:\r\n* Mac OS X 10.11.6 (prev is 10.11.5)\r\n* I'm running tmux 2.3 (prev is 2.2)\r\n* Installed via MacPorts (prev is Homebrew)\r\n* Running inside iTerm2 (prev is Terminal)\r\n\r\nI'm now running tmux with `-vvv`, and the logfiles are growing quickly. I have not been able to reproduce the crash purposely, but I will continue trying. If that fails I will disable SIP and wait for it to recur with Valgrind attached.\r\n\r\nIf you have any suggestions for tests that might reproduce the issue more readily, please let me know.\r\n\r\nThank you for all of your work on tmux!\r\n"}}
{"actor":{"display_login":"reynhout"}}