<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8863</bug_id>
          
          <creation_ts>2015-12-31 06:09:31 +0000</creation_ts>
          <short_desc>dbus did not support large-file for stat64</short_desc>
          <delta_ts>2016-02-14 06:56:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1 M2</target_milestone>
          
          <blocked>6803</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Hongxu Jia">hongxu.jia</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>liezhi.yang</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57495</commentid>
    <comment_count>0</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2015-12-31 06:09:31 +0000</bug_when>
    <thetext>While starting dbus-daemon on a 32-bit linux host and it invokes
fstat to load /etc/dbus-1/system.conf through NFS. If system.conf
was created with a large indoe number on 64-bit host. The above
fstat invoking failed. Here is the log of strace:
............
root@qemu3:~# df 
Filesystem                                                                                1K-blocks       Used  Available Use% Mounted on
10.0.2.2:/buildarea/raid0/hjia/wrlinux-x-master-1120/build-20151230-qemux86/export/dist 15623790592 8566374092 7057416500  55% /

root@qemu3:~# cat /proc/cmdline 
console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=10.0.2.2:/buildarea/raid0/hjia/wrlinux-x-master-1120/build-20151230-qemux86/export/dist,nfsvers=3,port=3349,mountprog=21411,nfsprog=11411,udp,mountport=3348 rw clock=pit oprofile.timer=1 TCF=1

root@qemu3:~# ls -i /etc/dbus-1/system.conf 
62318090305 /etc/dbus-1/system.conf

root@qemu3:~# strace /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
|open(&quot;/etc/dbus-1/system.conf&quot;, O_RDONLY) = 4
|fstat64(4, {st_mode=S_IFREG|0644, st_size=3340, ...}) = 0
|close(4) = 0
|close(3) = 0
|write(2, &quot;Failed to start message bus: Fai&quot;..., 109Failed to start message bus:
Failed to stat &quot;/etc/dbus-1/system.conf&quot;: Value too large for defined data type
|) = 109
|exit_group(1) = ?
|+++ exited with 1 +++
............</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57496</commentid>
    <comment_count>1</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2015-12-31 06:10:55 +0000</bug_when>
    <thetext>In this situation, we should support large-file for stat64. Add marco
AC_SYS_LARGEFILE to do the detection at configure time. It can be disabled
by configuring with the `--disable-largefile&apos; option.

Also file a bug and send patch to upstream:
https://bugs.freedesktop.org/show_bug.cgi?id=93545
https://bugs.freedesktop.org/attachment.cgi?id=120747

//Hongxu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57497</commentid>
    <comment_count>2</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2015-12-31 06:44:38 +0000</bug_when>
    <thetext>It refers:

http://www.delorie.com/gnu/docs/autoconf/autoconf_67.html
http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
http://www.tcm.phy.cam.ac.uk/sw/inodes64.html

//Hongxu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57648</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-01-07 17:20:40 +0000</bug_when>
    <thetext>BTW, there&apos;s also bug 6803 which covers this at the distro level.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57801</commentid>
    <comment_count>4</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2016-01-14 06:30:36 +0000</bug_when>
    <thetext>Merged into master:
...
commit 3f4fb3936edbf42b6e94b71e0f243acd6c56b132
Author: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Date:   Mon Jan 4 10:08:42 2016 +0800

    dbus: support large-file for stat64
...

//Hongxu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58985</commentid>
    <comment_count>5</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2016-02-14 06:56:39 +0000</bug_when>
    <thetext>Accepted by upstream:

commit 96ffc2a07eb10c0265b654ade972c66e39f9fafb
Author: Simon McVittie &lt;simon.mcvittie@collabora.co.uk&gt;
Date:   Mon Feb 8 17:25:38 2016 +0000

    configure.ac: support large-file for stat64
    
    dbus-daemon is not expected to open files with large *sizes*, but without
    large file support, calling [f]stat() on a file that happens to have a
    large inode number will fail with EOVERFLOW (see stat(2)). For example,
    files mounted from an NFS server might have large inode numbers.
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545
    Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
    [smcv: shorten and clarify commit message; move AC_SYS_LARGEFILE
    after AC_USE_SYSTEM_EXTENSIONS because nothing should compile C before
    that point]
    Reviewed-by: Simon McVittie &lt;simon.mcvittie@collabora.co.uk&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>