{"action":"created","issue":{"url":"https://api.github.com/repos/grosser/parallel/issues/227","repository_url":"https://api.github.com/repos/grosser/parallel","labels_url":"https://api.github.com/repos/grosser/parallel/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/grosser/parallel/issues/227/comments","events_url":"https://api.github.com/repos/grosser/parallel/issues/227/events","html_url":"https://github.com/grosser/parallel/issues/227","id":352025401,"node_id":"MDU6SXNzdWUzNTIwMjU0MDE=","number":227,"title":"test failures caused by Thread trace output","user":{"login":"boutil","id":990732,"node_id":"MDQ6VXNlcjk5MDczMg==","avatar_url":"https://avatars2.githubusercontent.com/u/990732?v=4","gravatar_id":"","url":"https://api.github.com/users/boutil","html_url":"https://github.com/boutil","followers_url":"https://api.github.com/users/boutil/followers","following_url":"https://api.github.com/users/boutil/following{/other_user}","gists_url":"https://api.github.com/users/boutil/gists{/gist_id}","starred_url":"https://api.github.com/users/boutil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutil/subscriptions","organizations_url":"https://api.github.com/users/boutil/orgs","repos_url":"https://api.github.com/users/boutil/repos","events_url":"https://api.github.com/users/boutil/events{/privacy}","received_events_url":"https://api.github.com/users/boutil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-20T08:01:47Z","updated_at":"2018-08-23T07:36:45Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nWhen building the package for Debian, the test suite is run. From time to time, a test fails because of the presence of a debug trace, which causes the output to not match the expected result:\r\n\r\nHere are two examples of such failures:\r\n```\r\nFailures:\r\n\r\n  1) Parallel.each does not call the finish hook when a start hook fails with threads\r\n     Failure/Error: `METHOD=each WORKER_TYPE=#{type} ruby spec/cases/with_exception_in_start_before_finish.rb 2>&1`.should == '3 called'\r\n     \r\n       expected: \"3 called\"\r\n            got: \"/home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.r... `public_send'\\n\\tfrom spec/cases/with_exception_in_start_before_finish.rb:21:in `<main>'\\n3 called\" (using ==)\r\n       Diff:\r\n       @@ -1,2 +1,28 @@\r\n       +/home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `value': No live threads left. Deadlock? (fatal)\r\n       +2 threads, 2 sleeps current:0x000055e6f85ce7c0 main thread:0x000055e6f8243ff0\r\n       +* #<Thread:0x000055e6f8278b68 sleep_forever>\r\n       +   rb_thread_t:0x000055e6f8243ff0 native:0x00007f2e54e99740 int:0\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `value'\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `map!'\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `in_threads'\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:335:in `work_in_threads'\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:262:in `map'\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:217:in `each'\r\n       +   spec/cases/with_exception_in_start_before_finish.rb:21:in `public_send'\r\n       +   spec/cases/with_exception_in_start_before_finish.rb:21:in `<main>'\r\n       +* #<Thread:0x000055e6f8550610@/home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:206 sleep_forever>\r\n       +   rb_thread_t:0x000055e6f85ce7c0 native:0x00007f2e54572700 int:0\r\n       +    depended by: tb_thread_id:0x000055e6f8243ff0\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:110:in `synchronize'\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:110:in `next'\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:338:in `block in work_in_threads'\r\n       +   /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:206:in `block (2 levels) in in_threads'\r\n       +        from /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `map!'\r\n       +        from /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `in_threads'\r\n       +        from /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:335:in `work_in_threads'\r\n       +        from /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:262:in `map'\r\n       +        from /home/boutil/debian/ruby-team/ruby-parallel/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:217:in `each'\r\n       +        from spec/cases/with_exception_in_start_before_finish.rb:21:in `public_send'\r\n       +        from spec/cases/with_exception_in_start_before_finish.rb:21:in `<main>'\r\n        3 called\r\n       \r\n     # ./spec/parallel_spec.rb:524:in `block (4 levels) in <top (required)>'\r\n     # ./spec/spec_helper.rb:8:in `block (2 levels) in <top (required)>'\r\n\r\nFinished in 55.06 seconds (files took 0.21319 seconds to load)\r\n120 examples, 1 failure, 9 pending\r\n\r\nFailed examples:\r\n\r\nrspec ./spec/parallel_spec.rb[1:9:23] # Parallel.each does not call the finish hook when a start hook fails with threads\r\n```\r\n\r\nor\r\n\r\n\r\n```\r\nFailures:\r\n\r\n  1) Parallel lambdas runs in threads\r\n     Failure/Error: `ruby spec/cases/with_#{thing}.rb THREADS 2>&1`.should == result\r\n\r\n       expected: \"ITEM-1\\nITEM-2\\nITEM-3\\n\"\r\n            got: \"/<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/paral...usr/lib/ruby/vendor_ruby/parallel.rb:262:in `map'\\n\\tfrom spec/cases/with_queue.rb:18:in `<main>'\\n\" (using ==)\r\n       Diff:\r\n       @@ -1,4 +1,23 @@\r\n       -ITEM-1\r\n       -ITEM-2\r\n       -ITEM-3\r\n       +/<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `value': No live threads left. Deadlock? (fatal)\r\n       +2 threads, 2 sleeps current:0x000056125940cf40 main thread:0x0000561258fd10d0\r\n       +* #<Thread:0x0000561259004b70 sleep_forever>\r\n       +   rb_thread_t:0x0000561258fd10d0 native:0x00007efd2c062740 int:1\r\n       +   /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `value'\r\n       +   /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `map!'\r\n       +   /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `in_threads'\r\n       +   /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:335:in `work_in_threads'\r\n       +   /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:262:in `map'\r\n       +   spec/cases/with_queue.rb:18:in `<main>'\r\n       +* #<Thread:0x00005612592e8508@/<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:206 sleep_forever>\r\n       +   rb_thread_t:0x000056125940cf40 native:0x00007efd2bb39700 int:0\r\n       +    depended by: tb_thread_id:0x0000561258fd10d0\r\n       +   /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:102:in `synchronize'\r\n       +   /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:102:in `next'\r\n       +   /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:338:in `block in work_in_threads'\r\n       +   /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:206:in `block (2 levels) in in_threads'\r\n       +\tfrom /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `map!'\r\n       +\tfrom /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:207:in `in_threads'\r\n       +\tfrom /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:335:in `work_in_threads'\r\n       +\tfrom /<<PKGBUILDDIR>>/debian/ruby-parallel/usr/lib/ruby/vendor_ruby/parallel.rb:262:in `map'\r\n       +\tfrom spec/cases/with_queue.rb:18:in `<main>'\r\n     # ./spec/parallel_spec.rb:574:in `block (4 levels) in <top (required)>'\r\n     # ./spec/spec_helper.rb:8:in `block (2 levels) in <top (required)>'\r\n\r\nFinished in 47.46 seconds (files took 0.16615 seconds to load)\r\n120 examples, 1 failure, 9 pending\r\n\r\nFailed examples:\r\n\r\nrspec './spec/parallel_spec.rb[1:13:1]' # Parallel lambdas runs in threads\r\n```\r\n\r\nThese traces are certainly not wanted, but maybe the tests should use regexp matches instead of strict equality of strings. What do you think?"},"comment":{"url":"https://api.github.com/repos/grosser/parallel/issues/comments/415321236","html_url":"https://github.com/grosser/parallel/issues/227#issuecomment-415321236","issue_url":"https://api.github.com/repos/grosser/parallel/issues/227","id":415321236,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTMyMTIzNg==","user":{"login":"boutil","id":990732,"node_id":"MDQ6VXNlcjk5MDczMg==","avatar_url":"https://avatars2.githubusercontent.com/u/990732?v=4","gravatar_id":"","url":"https://api.github.com/users/boutil","html_url":"https://github.com/boutil","followers_url":"https://api.github.com/users/boutil/followers","following_url":"https://api.github.com/users/boutil/following{/other_user}","gists_url":"https://api.github.com/users/boutil/gists{/gist_id}","starred_url":"https://api.github.com/users/boutil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutil/subscriptions","organizations_url":"https://api.github.com/users/boutil/orgs","repos_url":"https://api.github.com/users/boutil/repos","events_url":"https://api.github.com/users/boutil/events{/privacy}","received_events_url":"https://api.github.com/users/boutil/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T07:36:45Z","updated_at":"2018-08-23T07:36:45Z","author_association":"NONE","body":"If you want me to run some more tests/debugging, let me know, I would be happy to help."}}
{"actor":{"display_login":"boutil"}}