I'm using simple-scan on Debian and it is now always crashing. It worked fine a few months ago. I suspect that something got upgraded (I'm running bullseye) and broke things.

The output from simple-scan says:

simple-scan: thread-watch.c:165: avahi_threaded_poll_quit: Assertion `pthread_equal(pthread_self(), p->thread_id)' failed.

I tried running ldd /usr/bin/simple-scan to make sure all the packages associated with all the libraries are recent, including libc6. I also tried running with simple-scan -d, but the debug output proved useless. I also tried strace /usr/sbin/simple-scan to look at all the shared libraries that were being loaded and they all had recent versions.

I noticed that the libavahi shared libraries are loaded dynamically (i.e., not visible via ldd) by simple-scan. So, I made sure that those were also recent.

I also tried xsane, but it has the same problem.

Perhaps unrelatedly, I see the following messages in my system log file:

avahi-daemon[1020220]: Too many clients, client request failed.

scanimage does not crash, but it fails in an unrelated way.

I am at my wit's end and don't know what else can be done.

2 Answers 2


It turns out to be "user error". I saw that the following line in /etc/avahi/avahi-daemon.conf’:


Not sure why this was added. After I commented it out and restarted it via

sudo systemctl restart avahi-daemon.service

things started working again.


I wanted to comment on your question, but as I don't have a reputation, I cannot and therefore I'll do it in an answer.

I have got a similiar problem with simple-scan on debian bullseye since start of October 2022. In my case I am able to start simple-scan. I then press the scan button. After a few seconds the scanner (Brother DCP) appears to start scanning. There is a little noise from the document feeder. But before anything is scanned, simple-scan crashes/closes.

xsane is working for me.

also simple-scan -d proved useless.

I just found out that scanning as superuser works.

Update Jan 2, 2023: I wanted to scan today. Scanning as superuser (sudo simple-scan) does not work anymore. There are no error messages in system logs or on the console. xsane still works, but I find it cumbersome.

** 2nd Update Jan 2, 2023:**

I used scanimage -L to see a list of scanning devices:

device `brother4:net1;dev0' is a Brother *Brother_DCP_9020CDW DCP
device `airscan:w1:Brother DCP-9020CDW' is a WSD Brother DCP-9020CDW ip=192.168.x.y

simple-scan defaults to the first device. After choosing the second device simple-scan worked as a charm. Unfortunately I never bothered checking the device dropdown menu before.

  • Ah. It was on my todo list to try the superuser thing next. I'll get back to you. Thanks for the comment. Commented Nov 15, 2022 at 21:06
  • I tried the root/superuser thing, but got the same result. But, I figured out the problem. I'll include that in an answer. Commented Nov 19, 2022 at 17:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .