{"action":"created","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/4073","repository_url":"https://api.github.com/repos/jruby/jruby","labels_url":"https://api.github.com/repos/jruby/jruby/issues/4073/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/4073/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/4073/events","html_url":"https://github.com/jruby/jruby/issues/4073","id":171084024,"number":4073,"title":"IO#fsync doesn't trigger an fsync(2) syscall?","user":{"login":"marktriggs","id":149123,"avatar_url":"https://avatars.githubusercontent.com/u/149123?v=3","gravatar_id":"","url":"https://api.github.com/users/marktriggs","html_url":"https://github.com/marktriggs","followers_url":"https://api.github.com/users/marktriggs/followers","following_url":"https://api.github.com/users/marktriggs/following{/other_user}","gists_url":"https://api.github.com/users/marktriggs/gists{/gist_id}","starred_url":"https://api.github.com/users/marktriggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marktriggs/subscriptions","organizations_url":"https://api.github.com/users/marktriggs/orgs","repos_url":"https://api.github.com/users/marktriggs/repos","events_url":"https://api.github.com/users/marktriggs/events{/privacy}","received_events_url":"https://api.github.com/users/marktriggs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-14T22:59:33Z","updated_at":"2016-08-24T20:50:51Z","closed_at":null,"body":"Hi there,\r\n\r\nWhen I make a call to IO#fsync on an open file handle, I expected to\r\nsee an fsync(2) syscall triggered (as MRI Ruby does), but in the\r\ncurrent JRuby master branch I don't see that.\r\n\r\nI'm testing on `Linux thweeble 3.16.0-4-amd64 #1 SMP Debian\r\n3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux` as follows:\r\n\r\n     # MRI Ruby\r\n     #\r\n     $ ruby --version\r\n     ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]\r\n\r\n     $ strace -qq -e fsync,fdatasync -f ruby -e 'File.open(\"/tmp/testfile\", \"w\") do |fh| fh.write(\"test\\n\"); fh.fsync; end'\r\n     [pid 13600] fsync(7)                    = 0\r\n\r\n     # JRuby built from commit 0ebd63589cf430a171f4224da4226e8c86e52203\r\n     #\r\n     $ strace -qq -e fsync,fdatasync -f java -cp lib/jruby.jar org.jruby.Main -e 'File.open(\"/tmp/testfile\", \"w\") do |fh| fh.write(\"test\\n\"); fh.fsync; end'\r\n     [pid 13702] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---\r\n     [pid 13702] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xc} ---\r\n     [pid 13722] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7ff5988cf700} ---\r\n     [pid 13708] <... futex resumed> )       = ? <unavailable>\r\n\r\nDoes this seem like a potential bug?  I couldn't find any other issues\r\nreferencing this.\r\n\r\nThanks!\r\n\r\nMark"},"comment":{"url":"https://api.github.com/repos/jruby/jruby/issues/comments/242203721","html_url":"https://github.com/jruby/jruby/issues/4073#issuecomment-242203721","issue_url":"https://api.github.com/repos/jruby/jruby/issues/4073","id":242203721,"user":{"login":"headius","id":10135,"avatar_url":"https://avatars.githubusercontent.com/u/10135?v=3","gravatar_id":"","url":"https://api.github.com/users/headius","html_url":"https://github.com/headius","followers_url":"https://api.github.com/users/headius/followers","following_url":"https://api.github.com/users/headius/following{/other_user}","gists_url":"https://api.github.com/users/headius/gists{/gist_id}","starred_url":"https://api.github.com/users/headius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/headius/subscriptions","organizations_url":"https://api.github.com/users/headius/orgs","repos_url":"https://api.github.com/users/headius/repos","events_url":"https://api.github.com/users/headius/events{/privacy}","received_events_url":"https://api.github.com/users/headius/received_events","type":"User","site_admin":false},"created_at":"2016-08-24T20:50:51Z","updated_at":"2016-08-24T20:50:51Z","body":"Ok, I'm rigging a patch that will actually fsync anything that has a FileChannel and anything in a NativeSelectableChannel from jnr-enxio. I don't know how to do the same for e.g. JDK SocketChannel, pipes, and other non-file streams."}}
{"actor":{"display_login":"headius"}}