unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Anand Mohanadoss <anand108@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 19180@debbugs.gnu.org, Linas Vepstas <linasvepstas@gmail.com>
Subject: bug#19180: guile bug#19180: vacuum_weak_hash_table error
Date: Mon, 15 Dec 2014 12:06:44 +0530	[thread overview]
Message-ID: <CAFNjtaAbJH85FZcFbUBta62Q=HsxdkkFVzNGz_7bw_yzM+fj0g@mail.gmail.com> (raw)
In-Reply-To: <87k322bi46.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 6752 bytes --]

Dear Ludovic,

Given your recommendation to use the 'stable-2.0' branch, we tried to
create a fix for the issue with our limited knowledge (assuming that the
size of the hash is getting corrupted by multiple threads).  The process
ran to completion, but, we got different results compared to what we get
with threading disabled.  So, it didn't really help and our assumption
appears to be incorrect. Is there something else we can try, to help you
with creating a proper patch for this issue?

Here is what we changed in hashtab.c -

130a131
>   size_t orig_len = len;
137,138c138,144
<       assert (removed <= len);
<       len -= removed;
---
>       if (removed <= len)
>         len -= removed;
>       else
>       {
>         printf ("Vacuum weak hash table assert Table=%p len=%zi
removed=%zi orig_len=%zi n_items=%zi\n", table, len, removed, orig_len,
SCM_HASHTABLE_N_ITEMS (table));
>         len = 0;
>       }

With this change, we got lines similar to the following printed
periodically -

Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=2 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=2 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=3 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=2 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=4 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=2 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2321
n_items=2321
......
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=205
n_items=205
.......
Vacuum weak hash table assert Table=0x9bdb840 len=1 removed=2 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=2 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274
Vacuum weak hash table assert Table=0x9bdb840 len=0 removed=1 orig_len=2274
n_items=2274

Thanks,
Anand



On Mon, Dec 8, 2014 at 3:04 PM, Ludovic Courtès <ludo@gnu.org> wrote:

> Anand Mohanadoss <anand108@gmail.com> skribis:
>
> > I downloaded the current guile code in git and will give it a try.  But,
> > given that this is not a stable release, I am not sure if we can really
> use
> > it for our purposes.
> >
> > Do you or Ludovic know when a stable 2.2 version will be released?  From
> > stability point of you, would it be better to use a patched version of
> > 2.0.11 that handles the case we noticed (e.g. don't attempt to remove
> items
> > from hash table if len = 0)?
>
> There is not ETA for 2.2.
>
> For now, I would recommend using the ‘stable-2.0’ branch, which
> corresponds to what will (hopefully soon) become 2.0.12.
>
> Thanks,
> Ludo’.
>

[-- Attachment #2: Type: text/html, Size: 7471 bytes --]

  reply	other threads:[~2014-12-15  6:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHrUA3554+87CVKsW2OT+-roVeyK4sE+xyDPaGf4ar5fAWQ2+Q@mail.gmail.com>
2014-12-08  7:34 ` bug#19180: guile bug#19180: vacuum_weak_hash_table error Anand Mohanadoss
2014-12-08  9:34   ` Ludovic Courtès
2014-12-15  6:36     ` Anand Mohanadoss [this message]
2016-06-22 14:55       ` Andy Wingo
2016-06-22 15:43         ` Anand Mohanadoss
2016-06-22 21:11           ` Linas Vepstas
2016-06-22 21:33           ` Andy Wingo
2016-06-23  4:24             ` Anand Mohanadoss
2016-07-12  7:32         ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFNjtaAbJH85FZcFbUBta62Q=HsxdkkFVzNGz_7bw_yzM+fj0g@mail.gmail.com' \
    --to=anand108@gmail.com \
    --cc=19180@debbugs.gnu.org \
    --cc=linasvepstas@gmail.com \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).