This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 103958 - Integer overflow when dealing when dealing with LARGE filesystems
Summary: Integer overflow when dealing when dealing with LARGE filesystems
Status: VERIFIED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: NBI (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: dlipin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-15 07:10 UTC by Kirill Sorokin
Modified: 2008-03-11 12:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Sorokin 2007-05-15 07:10:07 UTC
As reported by Dan Price:

Here is what I can see with truss:

  $ truss -f -t statvfs sh netbeans-6.0m9-basic-solaris-sparc.sh -silent -is:log
/tmp/foo
  Configuring installer...
  7831:   statvfs64("/", 0xFFBFEB88)                      = 0
  7885:   statvfs64("/tmp", 0xFFBFEB70)                   = 0
  Search JVM on the system...
  Extracting installation data...
  8375:   statvfs64("/tmp", 0xFFBFEB70)                   = 0
  Running installer wizard...
  Java Accessibility Bridge for GNOME loaded.
  
So far, so good-- we're calling statvfs64, which won't overflow,
ever.

  ...
  8445/18:        statvfs("/home/dp/.nbi", 0xE2E7EC78)            Err#79 EOVERFLOW
  8445/21:        statvfs("/home/dp/.nbi", 0xE2C7F258)            Err#79 EOVERFLOW
  8445/21:        statvfs("/home/dp/.nbi", 0xE2C7F258)            Err#79 EOVERFLOW


Oh, party foul!  statvfs chokes when confronted with a filesystem this
big.  That's a bad bug.

I used dtrace to find the callsite of the statvfs():

  # dtrace -n 'syscall::statvfs:entry{trace(execname); ustack()}'

...
  1  54670                    statvfs:entry   java                             
              libc.so.1`statvfs+0x4
-----------> 
nbi-27725.tmp`Java_org_netbeans_installer_utils_system_UnixNativeUtils_getFreeSpace0+0x2c
              0xfc40eba8
              0xfc40eb54
              0xfc405950
              0xfc405950
              0xfc405950
              0xfc4058c0
              0xfc405a30
              0xfc40021c
             
libjvm.so`__1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_+0x1e4
             
libjvm.so`__1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_+0xec
             
libjvm.so`__1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_+0x74
              libjvm.so`__1cMthread_entry6FpnKJavaThread_pnGThread__v_+0x110
              libjvm.so`__1cKJavaThreadRthread_main_inner6M_v_+0x48
              libjvm.so`java_start+0x138
              libc.so.1`_lwp_start


Looks like this code is not large file[system] aware-- it should be: (see
lfcompile(5) and/or lf64(5)).
Comment 1 dlipin 2007-06-15 15:00:45 UTC
The issue is fixed.
Comment 2 Kirill Sorokin 2008-03-11 12:26:44 UTC
Verifying installer issues.