{"action":"created","issue":{"url":"https://api.github.com/repos/att/ast/issues/563","repository_url":"https://api.github.com/repos/att/ast","labels_url":"https://api.github.com/repos/att/ast/issues/563/labels{/name}","comments_url":"https://api.github.com/repos/att/ast/issues/563/comments","events_url":"https://api.github.com/repos/att/ast/issues/563/events","html_url":"https://github.com/att/ast/issues/563","id":327994852,"node_id":"MDU6SXNzdWUzMjc5OTQ4NTI=","number":563,"title":"ksh coprocess tests are flakey","user":{"login":"krader1961","id":7545917,"node_id":"MDQ6VXNlcjc1NDU5MTc=","avatar_url":"https://avatars2.githubusercontent.com/u/7545917?v=4","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"labels":[{"id":29413216,"node_id":"MDU6TGFiZWwyOTQxMzIxNg==","url":"https://api.github.com/repos/att/ast/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-31T05:01:29Z","updated_at":"2018-05-31T22:43:26Z","closed_at":null,"author_association":"COLLABORATOR","body":"The ksh `coprocess` unit test has always been flakey as of mid 2017 when I started contributing to this project. But since the switch from AST Vmalloc to the system malloc the failure rate has increased dramatically. Specifically, it is now timing out roughly 25% of the time. Whether this is due to a use-after-free bug or a failure exposed only because the layout of malloc()'ed memory is different is TBD (to be determined). Simply increasing that unit test timeout value does not help (see PR #560)."},"comment":{"url":"https://api.github.com/repos/att/ast/issues/comments/393705832","html_url":"https://github.com/att/ast/issues/563#issuecomment-393705832","issue_url":"https://api.github.com/repos/att/ast/issues/563","id":393705832,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzcwNTgzMg==","user":{"login":"krader1961","id":7545917,"node_id":"MDQ6VXNlcjc1NDU5MTc=","avatar_url":"https://avatars2.githubusercontent.com/u/7545917?v=4","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"created_at":"2018-05-31T22:43:26Z","updated_at":"2018-05-31T22:43:26Z","author_association":"COLLABORATOR","body":"When the hang occurs there are four ksh processes running. One of them has an interesting stack (see below). It is stuck inside `malloc()` trying to acquire a lock. And frame #7 shows that this is being done inside a signal handler. And just before that signal we were inside a `calloc()` call. Oops!\r\n\r\n```\r\n#0  0xb77a2c31 in __kernel_vsyscall ()\r\n#1  0xb7678b62 in __lll_lock_wait_private () at ../sysdeps/unix/sysv/linux/i386/lowlevellock.S:97\r\n#2  0xb75f2f9f in _int_free (av=0xb7737780 <main_arena>, p=0x9f501b8, have_lock=0) at malloc.c:3962\r\n#3  0x080fc9f0 in sfclose (f=0x9f501c0) at ../src/lib/libast/sfio/sfclose.c:150\r\n#4  0x0809b403 in sh_close (fd=6) at ../src/cmd/ksh93/sh/io.c:448\r\n#5  0x080a29e4 in job_reap (sig=17) at ../src/cmd/ksh93/sh/jobs.c:486\r\n#6  0x080a2498 in job_waitsafe (sig=17, info=0xbfee080c, context=0xbfee088c) at ../src/cmd/ksh93/sh/jobs.c:325\r\n#7  <signal handler called>\r\n#8  __memset_ia32 () at ../sysdeps/i386/i686/multiarch/../memset.S:77\r\n#9  0xb75f44b8 in alloc_perturb (n=<optimized out>, p=<optimized out>) at malloc.c:1880\r\n#10 _int_malloc (av=av@entry=0xb7737780 <main_arena>, bytes=bytes@entry=32769) at malloc.c:3806\r\n#11 0xb75f5fc5 in __GI___libc_malloc (bytes=32769) at malloc.c:2913\r\n#12 0x0809ad4e in sh_iostream (shp=0x81e5280 <sh>, fd=14, fn=14) at ../src/cmd/ksh93/sh/io.c:313\r\n#13 0x08062ace in sh_readline (shp=0x81e5280 <sh>, names=0x9f324b8, readfn=0x0, fd=14, flags=0, size=0, timeout=0) at ../src/cmd/ksh93/bltins/read.c:413\r\n#14 0x08062911 in b_read (argc=2, argv=0x9f324b8, context=0x81e5608 <sh+904>) at ../src/cmd/ksh93/bltins/read.c:356\r\n#15 0x080ec99c in sh_exec (shp=0x81e5280 <sh>, t=0x9f32468, flags=516) at ../src/cmd/ksh93/sh/xec.c:1233\r\n#16 0x080ef69a in sh_exec (shp=0x81e5280 <sh>, t=0x9f47794, flags=516) at ../src/cmd/ksh93/sh/xec.c:1954\r\n#17 0x080f04cb in sh_exec (shp=0x81e5280 <sh>, t=0x9f32388, flags=516) at ../src/cmd/ksh93/sh/xec.c:2150\r\n#18 0x080ef69a in sh_exec (shp=0x81e5280 <sh>, t=0x9f4e1ac, flags=516) at ../src/cmd/ksh93/sh/xec.c:1954\r\n#19 0x080efe67 in sh_exec (shp=0x81e5280 <sh>, t=0x9f315f8, flags=4) at ../src/cmd/ksh93/sh/xec.c:2084\r\n#20 0x080b8bf1 in exfile (shp=0x81e5280 <sh>, iop=0x9f43638, fno=11) at ../src/cmd/ksh93/sh/main.c:536\r\n#21 0x080b7dcb in sh_main (ac=3, av=0xbfee2b64, userinit=0x0) at ../src/cmd/ksh93/sh/main.c:335\r\n#22 0x080dcfa4 in main (argc=3, argv=0xbfee2b64) at ../src/cmd/ksh93/sh/pmain.c:41\r\n```"}}
{"actor":{"display_login":"krader1961"}}