! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar segfaults after start
Status:
CLOSED: FIXED
Severity:
critical
Product:
Thunar-vfs
Component:
General

Comments

Description Tim van der Molen 2006-09-05 14:02:17 CEST
User-Agent:       Mozilla/5.0 (X11; U; OpenBSD i386; en-GB; rv:1.8.0.5) Gecko/20060731 Firefox/1.5.0.5
Build Identifier: 

When starting Thunar, it displays its window for a split second and then segfaults.

Reproducible: Always

Steps to Reproduce:
1. Start Thunar.

Actual Results:  
Segfault.

Expected Results:  
Not to segfault.

cairo 1.0.4
gcc 3.3.5 (propolice)
exo 0.3.1.10rc1
glib 2.10.3
gtk+ 2.8.19
libxfce4mcs 4.2.3
libxfce4util 4.2.3.2
libxfcegui4 4.2.3
Comment 1 Tim van der Molen 2006-09-05 14:03:19 CEST
Created attachment 772 
Backtrace
Comment 2 Benedikt Meurer editbugs 2006-09-05 14:13:13 CEST
Hm, a crash in getdirentries() is rather unlikely. Can you grab backtraces from the other threads as well? You can switch between threads using the "thread <id>" command, where the <id>s are usually in the range of 1 to 4 (tho that may differ depending on the system).
Comment 3 Tim van der Molen 2006-09-05 14:17:26 CEST
Created attachment 773 
Backtrace (again)

The MIME type of the previous backtrace attachment was incorrectly auto-detected.
Comment 4 Tim van der Molen 2006-09-05 14:30:46 CEST
Created attachment 774 
Backtraces from threads
Comment 5 Tim van der Molen 2006-09-05 14:32:51 CEST
(In reply to comment #2)
> Hm, a crash in getdirentries() is rather unlikely. Can you grab backtraces from
> the other threads as well? You can switch between threads using the "thread
> <id>" command, where the <id>s are usually in the range of 1 to 4 (tho that may
> differ depending on the system).

Done. See the attachment.
Comment 6 Benedikt Meurer editbugs 2006-09-05 14:46:00 CEST
Hm, looks like it does indeed crash in getdirentries(), which shouldn't happen. Can you ask on an OpenBSD mailinglist about this? Because according to the man page we use getdirentries() properly (and afterall it should never crash in a system call).
Comment 7 Tim van der Molen 2006-09-07 21:48:53 CEST
(In reply to comment #6)
> Hm, looks like it does indeed crash in getdirentries(), which shouldn't happen.
> Can you ask on an OpenBSD mailinglist about this? Because according to the man
> page we use getdirentries() properly (and afterall it should never crash in a
> system call).

I've mailed the OpenBSD mailing list earlier this evening and so far I have received one reply blaiming alloca(). See: <http://marc.theaimsgroup.com/?l=openbsd-misc&m=115765565527489&w=2>.
Comment 8 Tim van der Molen 2006-09-08 14:29:16 CEST
Created attachment 779 
Use calloc() instead of alloca()

I received this patch from Tobias Ulmer <tobiasu at tmux.org> which fixes the crash for me.
Comment 9 Benedikt Meurer editbugs 2006-09-08 16:23:34 CEST
Hm, alloca() is probably not the best bet, but atleast that shouldn't make a syscall crash. Anyway, I'll add a work-around.
Comment 10 Benedikt Meurer editbugs 2006-09-08 20:08:34 CEST
Fixed with revision 23110.

2006-09-08	Benedikt Meurer <benny@xfce.org>

	* thunar-vfs/thunar-vfs-os-bsd.c(_thunar_vfs_os_scandir): Allocate the
	  directory scan buffer on the heap rather than the stack to avoid
	  crashes on systems with very small thread stacks. Bug #2269.

Bug #2269

Reported by:
Tim van der Molen
Reported on: 2006-09-05
Last modified on: 2010-11-07

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Version:
unspecified

Attachments

Backtrace (6.67 KB, application/octet-stream)
2006-09-05 14:03 CEST , Tim van der Molen
no flags
Backtrace (again) (6.67 KB, text/plain)
2006-09-05 14:17 CEST , Tim van der Molen
no flags
Backtraces from threads (6.54 KB, text/plain)
2006-09-05 14:30 CEST , Tim van der Molen
no flags
Use calloc() instead of alloca() (877 bytes, patch)
2006-09-08 14:29 CEST , Tim van der Molen
no flags

Additional information