Your message dated Sun, 31 Jan 2016 17:05:38 +0100
with message-id <[email protected]>
and subject line Re: Bug#813273: libsane: SIGSEGV and memory corruption on 
scanner list changes when sane_init/sane_exit is used
has caused the Debian Bug report #813273,
regarding libsane: SIGSEGV and memory corruption on scanner list changes when 
sane_init/sane_exit is used
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
813273: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813273
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libsane
Version: 1.0.25-2
Severity: important

Dear Maintainer,

even a trivial program that uses sane_init, sane_get_devices, and sane_exit in 
a loop, crashes with SIGSEGV
in the moment that a change on the device list occurs.

I.e. the following program crashes when you switch on or off a scanner after 
you started it:


#include <sane/sane.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main (int argc, char **argv) {
   while (1) {
       if (sane_init(0, 0) != SANE_STATUS_GOOD)
           exit (1);

       const SANE_Device ** device_list;
       if (sane_get_devices (&device_list, 1) == SANE_STATUS_GOOD) {
           const SANE_Device **dev = device_list;
           while (*dev)
               dev++;
           printf ("Device count: %d\n", dev - device_list);
       } else {
           fputs ("Failed sane_get_devices\n", stderr);
       }
       sleep (1);
       sane_exit();
       sleep (1);
   }
}

The result seems to be a heavy memory corruption, at least I could not get any 
sensible information from
a core dump produced.

I get the same behaviour with two different backends, epson2 and the 
epkowa/iscan2 provided by Epson.

In practice, this is what occurs to scanbd, only that this is a much more 
complicated piece of software.

I would have expected that this program runs slow and inefficient, but stable, 
and presents an up-to-date
number of switched-on, connected scanners.

A finding that might be related or a different bug on its own is, that the list 
returned by sane_get_devices
does never change if you do not call sane_init/sane_exit in the loop. This is 
at least a difference to the
documented behaviour.

In summary, it appears impossible to write a program that presents an 
up-to-date scanner device list without
restarting itself..?

Yours,
Andreas.

-- System Information:
Debian Release: stretch/sid
 APT prefers testing
 APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.3.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages libsane depends on:
ii  acl                2.2.52-2
ii  adduser            3.113+nmu3
ii  libavahi-client3   0.6.32~rc+dfsg-1
ii  libavahi-common3   0.6.32~rc+dfsg-1
ii  libc6              2.21-7
ii  libexif12          0.6.21-2
ii  libgphoto2-6       2.5.9-3
ii  libgphoto2-port12  2.5.9-3
ii  libieee1284-3      0.2.11-12
ii  libjpeg62-turbo    1:1.4.1-2
ii  libsane-common     1.0.25-2
ii  libtiff5           4.0.6-1
ii  libusb-1.0-0       2:1.0.20-1
ii  makedev            2.3.1-93
ii  udev               228-4+b1

Versions of packages libsane recommends:
ii  libsane-extras  1.0.22.3
ii  sane-utils      1.0.25-2

Versions of packages libsane suggests:
ii  avahi-daemon  0.6.32~rc+dfsg-1
pn  hplip         <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
severity 813273 normal
thanks


Hello Andreas,

the Debian BTS is not the right place to get help for your own
programing. 

On a first review I see 2 errors. I think that the crash isn't from
sane-backends.

Please use for asking about your programing[1] or [2].

So I close this bug.

CU
Jörg


[1] http://lists.alioth.debian.org/mailman/listinfo/sane-devel
[2] irc://irc.freenode.net/sane


-- 
New:
GPG Fingerprint: 63E0 075F C8D4 3ABB 35AB  30EE 09F8 9F3C 8CA1 D25D
GPG key (long) : 09F89F3C8CA1D25D
GPG Key        : 8CA1D25D
CAcert Key S/N : 0E:D4:56

Old pgp Key: BE581B6E (revoked since 2014-12-31).

Jörg Frings-Fürst
D-54538 Bausendorf

Threema: SYR8SJXB

IRC: [email protected]
     [email protected]

My wish list: 
 - Please send me a picture from the nature at your home.


Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---

Reply via email to