Should we be building debug=0 for packaging?

4 views
Skip to first unread message

sgheeren

unread,
Feb 10, 2010, 6:22:12 PM2/10/10
to zfs-...@googlegroups.com
With respect to a recent issue (#27 see http://zfs-fuse.net/issues/27) I
have started to think again about something that worried me before.

I suspect that by default zfs-fuse is being built _with_ debug asserts
enabled. This is certainly _not_ what you want in many situations. In
this particular issue #27, e.g. it seems like zfs-fuse is dieing on an
failed assert. The assert is merely detecting an odd situation[1], this
should in practice not cause any harm other than the reservation not
being met. However, as it stands, it will cause the daemon to crash and
keep crashing, so the pool is effectively dead.


RFC:
===
On the subject of changing the default debug flag to debug=0 what say ye?

On the subject of warning packagers that stable build should be built
'debug=0', what say ye?

scons debug=0
# sudo scons debug=0 install


Regards,
Seth

[1] that can cause reservations to be (temporarily) violated when
removing large amounts of dedup-ed data from a filesystem with a
reservation /so large/ that other filesystems cannot /legally/ store the
data without violating the reservation made by the first fs.

Rudd-O

unread,
Feb 11, 2010, 1:18:28 PM2/11/10
to zfs-...@googlegroups.com
TBH what I would want is that, even in debug=0, ZFS-FUSE would not crash
as you point out, BUT IT SHOULD POST A MSG TO SYSLOG saying that the
assertion failed. ATM it does neither so I find myself without a daemon
sometimes, and no way to debug it.

Seth Heeren

unread,
Feb 11, 2010, 3:08:27 PM2/11/10
to zfs-fuse
I agree that a 'soft' detection mode would be useful. I'd still prefer
a completely no-op assert at debug=0, but I might be convinced with
evidence that shows that the performance penalty is negligible on
normal operation.

We might invent a separate option just to this (debug=syslog or
debug=trace or debug=soft)?

On Feb 11, 7:18 pm, Rudd-O <rud...@rudd-o.com> wrote:
> TBH what I would want is that, even in debug=0, ZFS-FUSE would not crash
> as you point out, BUT IT SHOULD POST A MSG TO SYSLOG saying that the
> assertion failed.  ATM it does neither so I find myself without a daemon
> sometimes, and no way to debug it.
>
>
>
> On Thu, 2010-02-11 at 00:22 +0100, sgheeren wrote:

> > With respect to a recent issue (#27 seehttp://zfs-fuse.net/issues/27) I

devsk

unread,
Apr 23, 2010, 3:14:31 PM4/23/10
to Seth Heeren, zfs-...@googlegroups.com
Was this resolved? What are we supposed to build it with? debug=0?
Will I miss some important ASSERTS if I do that? like it papers over
the problem now and continues but dies later on.

-devsk
--
To post to this group, send email to zfs-...@googlegroups.com
To visit our Web site, click on http://zfs-fuse.net/

Subscription settings: http://groups.google.com/group/zfs-fuse/subscribe?hl=en

Emmanuel Anne

unread,
Apr 23, 2010, 3:32:40 PM4/23/10
to zfs-...@googlegroups.com
debug=0 is the default.
the asserts are useful when testing things, but on a sane system (without any corrupted data on a filesystem), there is no need to keep the assertions (it's common practice, usually they are disabled when building an optimized binary).

2010/4/23 devsk <dev...@gmail.com>



--
zfs-fuse git repository : http://rainemu.swishparty.co.uk/cgi-bin/gitweb.cgi?p=zfs;a=summary

devsk

unread,
Apr 23, 2010, 3:54:10 PM4/23/10
to zfs-fuse
You mean if I build with 'scons' or 'scons debug=0', it will be same?

How do I build the debug version then?

-devsk
> > To visit our Web site, click onhttp://zfs-fuse.net/

Emmanuel Anne

unread,
Apr 23, 2010, 4:30:49 PM4/23/10
to zfs-...@googlegroups.com
scons debug=1 -> with optimizations and debug symbols
debug=2 without optimizations
if debug > 0 assertions are defined

2010/4/23 devsk <dev...@gmail.com>
Reply all
Reply to author
Forward
0 new messages