You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2010/03/11 22:37:15 UTC

DO NOT REPLY [Bug 48894] New: gij fails with bus error when executing ant 1.8

https://issues.apache.org/bugzilla/show_bug.cgi?id=48894

           Summary: gij fails with bus error when executing ant 1.8
           Product: Ant
           Version: 1.8.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: mail.twerner@googlemail.com


Please have a look at
<http://svn.debian.org/viewsvn/pkg-java/trunk/ant/debian/patches/>. There is a
patch 0010-fix-bus-error-in-gij.patch that fixes this problem. Please consider
applying it.

When you are at it: may you check the other patches, too? Maybe you can apply
parts of it?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48894] gij fails with bus error when executing ant 1.8

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48894

J.M. (Martijn) Kruithof <jk...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
           Severity|normal                      |enhancement

--- Comment #2 from J.M. (Martijn) Kruithof <jk...@apache.org> 2010-03-12 08:45:55 UTC ---
The Bus overflow error is in gij, not in ant. Javadoc of FileChannel explicitly
states:

Fewer than the requested number of bytes are transferred if this channel's file
contains fewer than count bytes starting at the given position, or if the
target channel is non-blocking and it has fewer than count bytes free in its
output buffer.

And also:
This method is potentially much more efficient than a simple loop that reads
from this channel and writes to the target channel. Many operating systems can
transfer bytes directly from the filesystem cache to the target channel without
actually copying them. 

Applying this fix won't fix the bus overflow in gij, and may increase the
requested copy buffer size to the entire file size. Again even if we did this,
and an in-memory buffer is necessary, the actual buffer size used would be up
to the FileChannel, and be the resposibility of the FileChannel.

Will apply this patch, but please put the bus error bug in debian back where it
belongs (gij).

commited in:
http://svn.apache.org/viewvc?rev=922179&view=rev

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48894] gij fails with bus error when executing ant 1.8

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48894

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |1.8.1

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48894] gij fails with bus error when executing ant 1.8

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48894

--- Comment #4 from J.M. (Martijn) Kruithof <jk...@apache.org> 2010-03-12 09:11:21 UTC ---
also there the "blame" is put on ant
ant tries to mmap stdin (not true, ant does not mmap at all, the underlying
implementation of FileChannel in the virtual machine does (strange though a
file channel on stdin?) (or in case the code is compiled the corresponding  )

>From the bug report:
If ant mmap's a file that has only 1701 bytes, on an architecture with
page size of 4906, then any access beyond the first page will cause a
SIGBUS.

ant does not mmap, the native code behind the FileChannel implementation does.

The problem is that FileUtils.BUF_SIZE (8192)
is currently bigger than page size (4096)...

the buf size in ant is larger than the page size, again responsibility of the
implementation of the FileChannel, not the responsibility of ant.

Apparently there is a bug in gij or its libraries, ant may trigger that bug,
but please issue the bug to gij again.

According to the FileChannel documentation it is explicitly allowed to provide
a larger count than the (remaining) size of the originating file. If gij and
its libraries do not follow that contract it is a bug in gij, not in ant.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48894] gij fails with bus error when executing ant 1.8

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48894

--- Comment #1 from Ludovic Claude <lu...@laposte.net> 2010-03-11 22:19:43 UTC ---
Created an attachment (id=25117)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25117)
[PATCH] Fix bus overflow

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48894] gij fails with bus error when executing ant 1.8

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48894

--- Comment #3 from Torsten Werner <ma...@googlemail.com> 2010-03-12 08:51:26 UTC ---
The bug in gij is reported here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571532 and it contains some
extra information.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.