Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #887321 > unrolled thread

Bug#893057: python3-notmuch: random aborts on exit

Started byBrian May <bam@debian.org>
First post2018-03-16 00:00 +0100
Last post2018-03-25 08:40 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#893057: python3-notmuch: random aborts on exit Brian May <bam@debian.org> - 2018-03-16 00:00 +0100
    Bug#893057: python3-notmuch: random aborts on exit Jameson Graef Rollins <jrollins@finestructure.net> - 2018-03-16 01:10 +0100
    Bug#893057: python3-notmuch: random aborts on exit David Bremner <david@tethera.net> - 2018-03-16 01:40 +0100
      Bug#893057: python3-notmuch: random aborts on exit Brian May <bam@debian.org> - 2018-03-16 06:50 +0100
      Bug#893057: python3-notmuch: random aborts on exit Brian May <brian@linuxpenguins.xyz> - 2018-03-21 00:20 +0100
        Bug#893057: python3-notmuch: random aborts on exit David Bremner <david@tethera.net> - 2018-03-24 22:30 +0100
          Bug#893057: python3-notmuch: random aborts on exit Brian May <bam@debian.org> - 2018-03-25 08:40 +0200

#887321 — Bug#893057: python3-notmuch: random aborts on exit

FromBrian May <bam@debian.org>
Date2018-03-16 00:00 +0100
SubjectBug#893057: python3-notmuch: random aborts on exit
Message-ID<vtK0N-Az-5@gated-at.bofh.it>
Package: python3-notmuch
Version: 0.23.7-3
Severity: important

If I try to run the following program on Debian Stretch:

=== cut ===
#!/usr/bin/python3
import notmuch
db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)

def abcdef():
    pass

q_new = notmuch.Query(db, 'tag:new')
=== cut ===

I get the following output:

brian@wspdigital:~$ /usr/bin/python3 ./tagmail
Aborted

If I comment/remove any of the lines out (including the function that isn't
even referenced anywhere) or switch to Python2, then it works without any
problems.

Am wondering if this is a Python3 bug.

-- System Information:
Debian Release: 9.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.0-0.bpo.3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-notmuch depends on:
ii  libnotmuch4  0.23.7-3
ii  python3      3.5.3-1

python3-notmuch recommends no packages.

python3-notmuch suggests no packages.

-- no debconf information

[toc] | [next] | [standalone]


#887331

FromJameson Graef Rollins <jrollins@finestructure.net>
Date2018-03-16 01:10 +0100
Message-ID<vtL6y-1PM-5@gated-at.bofh.it>
In reply to#887321

[Multipart message — attachments visible in raw view] — view raw

On Fri, Mar 16 2018, Brian May <bam@debian.org> wrote:
> If I try to run the following program on Debian Stretch:
>
> === cut ===
> #!/usr/bin/python3
> import notmuch
> db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
>
> def abcdef():
>     pass
>
> q_new = notmuch.Query(db, 'tag:new')
> === cut ===
>
> I get the following output:
>
> brian@wspdigital:~$ /usr/bin/python3 ./tagmail
> Aborted
>
> If I comment/remove any of the lines out (including the function that isn't
> even referenced anywhere) or switch to Python2, then it works without any
> problems.
>
> Am wondering if this is a Python3 bug.

This is certainly very weird.  I am able to reproduce.  If I change the
script to this, though, it works fine:

  #!/usr/bin/python3
  import notmuch
  db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
  q_new = notmuch.Query(db, 'tag:new')

Something about the function definition in there causes this??

[toc] | [prev] | [next] | [standalone]


#887334

FromDavid Bremner <david@tethera.net>
Date2018-03-16 01:40 +0100
Message-ID<vtLzz-28T-1@gated-at.bofh.it>
In reply to#887321
Brian May <bam@debian.org> writes:
> === cut ===
>
> I get the following output:
>
> brian@wspdigital:~$ /usr/bin/python3 ./tagmail
> Aborted
>
> If I comment/remove any of the lines out (including the function that isn't
> even referenced anywhere) or switch to Python2, then it works without any
> problems.
>
> Am wondering if this is a Python3 bug.

I suspect it has to do with changes in memory management in python3.

You hide the problem by adding

del(db)

at the end of your script.

You can read some discussion at

https://notmuchmail.org/pipermail/notmuch/2016/021622.html

[toc] | [prev] | [next] | [standalone]


#887353

FromBrian May <bam@debian.org>
Date2018-03-16 06:50 +0100
Message-ID<vtQpz-6L7-3@gated-at.bofh.it>
In reply to#887334
David Bremner <david@tethera.net> writes:

> You hide the problem by adding
>
> del(db)
>
> at the end of your script.
>
> You can read some discussion at
>
> https://notmuchmail.org/pipermail/notmuch/2016/021622.html

Thanks for this, and the work around.

The workaround works fine.
-- 
Brian May <bam@debian.org>

[toc] | [prev] | [next] | [standalone]


#888402

FromBrian May <brian@linuxpenguins.xyz>
Date2018-03-21 00:20 +0100
Message-ID<vvyHU-2ro-15@gated-at.bofh.it>
In reply to#887334

[Multipart message — attachments visible in raw view] — view raw

On 2018-03-16 11:28, David Bremner wrote:

> I suspect it has to do with changes in memory management in python3.
> 
> You hide the problem by adding
> 
> del(db)
> 
> at the end of your script.

Unfortunately, I still seem to be getting this abort error, although not
as often. 

Curiously, changes to tags don't seem to be preserved after the program
exits. This may or may not be related.

[toc] | [prev] | [next] | [standalone]


#889117

FromDavid Bremner <david@tethera.net>
Date2018-03-24 22:30 +0100
Message-ID<vwYTE-2Ow-1@gated-at.bofh.it>
In reply to#888402
Brian May <brian@linuxpenguins.xyz> writes:

> On 2018-03-16 11:28, David Bremner wrote:
>
>> I suspect it has to do with changes in memory management in python3.
>> 
>> You hide the problem by adding
>> 
>> del(db)
>> 
>> at the end of your script.
>
> Unfortunately, I still seem to be getting this abort error, although not
> as often. 

For what it's worth, I can't replicate that with the given script (I ran
it 1000 times without any aborts).

> Curiously, changes to tags don't seem to be preserved after the program
> exits. This may or may not be related.

Do you mean in the case that it aborts, or when it exits normally?

[toc] | [prev] | [next] | [standalone]


#889159

FromBrian May <bam@debian.org>
Date2018-03-25 08:40 +0200
Message-ID<vx7tT-e7-3@gated-at.bofh.it>
In reply to#889117
David Bremner <david@tethera.net> writes:

> For what it's worth, I can't replicate that with the given script (I ran
> it 1000 times without any aborts).

I am not surprised, initially it worked fine for me too. No idea what
changed.

I ended up changing my script to use Python2.

>> Curiously, changes to tags don't seem to be preserved after the program
>> exits. This may or may not be related.
>
> Do you mean in the case that it aborts, or when it exits normally?

Only when my script aborts after completion.
-- 
Brian May <bam@debian.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web