Login | Register
My pages Projects Community openCollabNet

Discussions > dev > fsvs 1.0.10 /dev/null and apr_file_close() problem

fsvs
Discussion topic

Back to topic list

fsvs 1.0.10 /dev/null and apr_file_close() problem

Author =?iso-8859-1?Q?Fr=E9d=E9ric_Beuserie?= <frederic dot beuserie at alunys dot com>
Full name =?iso-8859-1?Q?Fr=E9d=E9ric_Beuserie?= <frederic dot beuserie at alunys dot com>
Date 2006-06-08 08:23:41 PDT
Message hi,

running the 1.0.10 snapshot against an svn repo, i'm experiencing failed update (import and commit is ok)

i've not found the exact cause of the problem but the update stop with "close of (read-only!) source failed" message.


looking down and debugging the source, i've found that the following piece of code (update.c, function *up__close_file() around line 891) try to call apr_file_close() with a /dev/null fname.

stracing the process fire up a call to "close(-1)" and then a return code 9 from apr_file_close().

it's certainly not a solution, but bypassing the two call make fsvs happy and everything is going well.



--------------------​--------------------​---------
                if (sts->entry_type == FT_FILE)
                {
                        DEBUGP("APR_FILE_CLOSE sts->s=%p ->d=%p", sts->source, sts->target);
                        status=apr_file_name​_get(&mbuf, sts->source);
                        DEBUGP("----> %s",mbuf);

                        /* THIS THROW AN error code 9
                        status=apr_file_clos​e(sts->source);
                        sts->source=NULL;
                        STOPIF(status, "close of (read-only!) source failed");
                        */

                        /* close() before rename() is necessary to
                         * find out if all data has been written
                         * (out of disk-space, etc) */

                        /* THIS THROW AN error code 9
                        BUG_ON(!sts->target, "no target handle for file??");
                        status=apr_file_clos​e(sts->target);

                        sts->target=NULL;
                        STOPIF(status, "close(%s) failed", filename_tmp);
                        */
                }
--------------------​------------



example output:

16:59:20.252 ops__build_path[est_ops.c:541] reallocated cache 9
16:59:20.252 ops__build_path[est_ops.c:559] status=0; path=./fichier
16:59:20.252 up__apply_textdelta[​update.c:769] target is ./fichier,
16:59:20.252 up__apply_textdelta[​update.c:770] temp is ./fichier.up.tmp
16:59:20.252 cs___end_of_block[ch​ecksum.c:415] manber reinit
16:59:20.252 ops__build_path[est_ops.c:473] 0x8183ef8 found in cache index 9; lru 9
16:59:20.252 ops__build_path[est_ops.c:559] status=0; path=./fichier
16:59:20.252 cs__new_manber_filte​r[checksum.c:649] initiating MD5 streaming for ./fichier
16:59:20.252 up__close_file[update.c:862] close file: is=d41d8cd98f00b204e​9800998ecf8427e should=d41d8cd98f00b​204e9800998ecf8427e
16:59:20.252 up__close_file[update.c:875] APR_FILE_CLOSE sts->s=0x8195748 ->d=0x81957b0

**** THERE ->>> 16:59:20.252 up__close_file[update.c:877] ----> /dev/null

16:59:20.252 up__set_meta_data[update.c:346] setting ./fichier.up.tmp to 0.0
16:59:20.252 up__set_meta_data[update.c:350] setting ./fichier.up.tmp's mode to 0644
16:59:20.252 up__set_meta_data[update.c:363] setting ./fichier.up.tmp's mtime Thu Jun 8 14:58:18 2006
16:59:20.253 hlp__lstat[helper.c:225] ./fichier.up.tmp: uid=0 gid=0 mode=100644 dev=902 ino=6094941 rdev=0 size=0
Rm.. 0 ./fichier
16:59:20.253 up__add_entry[update.c:393] add entry fichier1
16:59:20.253 up__parse_prop[update.c:81] got property for fichier1: svn:entry:committed-rev=379
16:59:20.253 up__parse_prop[update.c:81] got property for fichier1: svn:entry:committed-​date=2006-06-08T12:5​6:08.205873Z

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

fsvs 1.0.10 /dev/null and apr_file_close() problem =?iso-8859-1?Q?Fr=E9d=E9ric_Beuserie?= <frederic dot beuserie at alunys dot com> =?iso-8859-1?Q?Fr=E9d=E9ric_Beuserie?= <frederic dot beuserie at alunys dot com> 2006-06-08 08:23:41 PDT
Messages per page: