Bug 804 - Dolphin is crashed while accessing to smb resources
: Dolphin is crashed while accessing to smb resources
Status: RESOLVED FIXED
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Marathon
: All Linux
: Normal normal
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on: 894
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-27 13:21 MSD by FirstLevel
Modified: 2012-12-11 17:48 MSK (History)
3 users (show)

See Also:
RPM Package: psyncclient-0.1-51-rosa.lts2012.0.i586
ISO-related:
Bad POT generating:
Upstream:


Attachments
Dolphin log (9.63 KB, text/plain)
2012-09-27 13:21 MSD, FirstLevel
Details
dolphin gdb log (14.63 KB, text/plain)
2012-10-16 09:08 MSD, FirstLevel
Details
core file (1.05 MB, application/octet-stream)
2012-10-16 09:09 MSD, FirstLevel
Details
Log of GDB session with more symbol information (8.64 KB, application/octet-stream)
2012-10-18 17:39 MSD, Eugene Shatokhin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FirstLevel 2012-09-27 13:21:30 MSD
Created attachment 567 [details]
Dolphin log

Description of problem:
I use ROSA 2012 LTS and try to access to file resources of windows workstations.
I open dolphin and in address string specify link to smb resource like 
smb://DOMENNAME%5Cusername@192.168.15.1/share/ЛИЧНЫЕ ПАПКИ СОТРУДНИКОВ/Григорьев Сергей
I enter login and password in appropriate window and see content of smb resource.
But If I move any file to this resource the dolphin is crashed.
I have openned konsole, launch dolphin and attached the output from konsole when dolphin was crashed.

ROSA Linux release 2012.0 (LTS) for i586
rpm -qa | grep dolphin
libdolphinprivate4-4.8.3-5-rosa.lts2012.0.i586
dolphin-4.8.3-5-rosa.lts2012.0.i586

rpm -qa | grep samba
samba-common-3.5.14-3-rosa.lts2012.0.i586
samba-winbind-3.5.14-3-rosa.lts2012.0.i586
samba-client-3.5.14-3-rosa.lts2012.0.i586
samba-server-3.5.14-3-rosa.lts2012.0.i586
samba4-pidl-4.0.0-0.9.2.alpha21-mdv2011.0.i586

rpm -qa | grep ldap
perl-ldap-0.400.100-4-rosa.lts2012.0.noarch
nss_ldap-265-5-rosa.lts2012.0.i586
python-ldap-2.4.0-2-rosa.lts2012.0.i586
pam_ldap-186-4-rosa.lts2012.0.i586
libkldap4-4.8.3-1-rosa.lts2012.0.i586
kio4-ldap-4.8.3-1-rosa.lts2012.0.i586
openldap-2.4.25-6-rosa.lts2012.0.i586
libldap2.4_2-2.4.25-6-rosa.lts2012.0.i586
openldap-clients-2.4.25-6-rosa.lts2012.0.i586


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Comment 1 Denis Silakov 2012-10-03 11:32:44 MSD
Does this happen for all samba shares? E.g., for folders without russian names and spaces and for machines where no login/password is required?

It would be also useful to get a core dump file - in konsole, you can use ulimit to specify max core dump file size (e.g., 'ulimit -c 50000000') and then launch dolphin from konsole (from the folder where you have write access to - e.g., your home folder). A dump file should be generated there.
Comment 2 FirstLevel 2012-10-04 13:06:01 MSD
(In reply to comment #1)
> Does this happen for all samba shares? E.g., for folders without russian
> names and spaces and for machines where no login/password is required?
> 
> It would be also useful to get a core dump file - in konsole, you can use
> ulimit to specify max core dump file size (e.g., 'ulimit -c 50000000') and
> then launch dolphin from konsole (from the folder where you have write
> access to - e.g., your home folder). A dump file should be generated there.

As user said he want to use ROSA LTS for all possible variants namings resources and etc.
Comment 3 FirstLevel 2012-10-04 13:10:55 MSD
On other hand I (firstlevel@rosalab.ru) could not reproduce this crash with smb resources naming in english and entering name and password of domain user.
Comment 4 Denis Silakov 2012-10-04 13:13:16 MSD
(In reply to comment #2)
> (In reply to comment #1)
> > Does this happen for all samba shares? E.g., for folders without russian
> > names and spaces and for machines where no login/password is required?
> > 
> > It would be also useful to get a core dump file - in konsole, you can use
> > ulimit to specify max core dump file size (e.g., 'ulimit -c 50000000') and
> > then launch dolphin from konsole (from the folder where you have write
> > access to - e.g., your home folder). A dump file should be generated there.
> 
> As user said he want to use ROSA LTS for all possible variants namings
> resources and etc.

I don't insist on using English names only:) Just want to identify the source of the problem. Unfortunately, non-ASCII symbols still can lead to issues...

And is it possible to get a core dump file?
Comment 5 FirstLevel 2012-10-05 07:31:41 MSD
(In reply to comment #4)
>you can use ulimit to specify max core dump file size (e.g., 'ulimit -c >50000000') and then launch dolphin from konsole (from the folder where you have >write access to - e.g., your home folder). A dump file should be generated >there.

user reproduced all Your requierements to create dump-file but it did not create.
Comment 6 Denis Silakov 2012-10-05 12:06:45 MSD
(In reply to comment #5)
> (In reply to comment #4)
> >you can use ulimit to specify max core dump file size (e.g., 'ulimit -c >50000000') and then launch dolphin from konsole (from the folder where you have >write access to - e.g., your home folder). A dump file should be generated >there.
> 
> user reproduced all Your requierements to create dump-file but it did not
> create.

Sorry, I forgot to mention one more step:

echo "core" > /proc/sys/kernel/core_pattern 

(with root privileges). This command will set name of the core dump file. By default it is redirected to systemd-coredump, not to file.
Comment 7 FirstLevel 2012-10-05 14:04:37 MSD
As user said coredump while is not created as well
Algorithm:
# ulimit -c 50000000
# echo "core" > /proc/sys/kernel/core_pattern

$ dolphin
dolphin(18056) KXMLGUI::ActionList::plug: Index  13  is not within range (0 -  9 
dolphin(18056) KSambaSharePrivate::testparmParamValue: We got some errors while running testparm "Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Warning: Service printers defines a print command, but rameter is ignored when using CUPS libraries.
" 
dolphin(18056) KDesktopFile::isAuthorizedDesktopFile: Access to ' "/home/serg/1c.desktop" ' denied, not owned by root, executable flag not set. 

dolphin(18056) KDesktopFile::isAuthorizedDesktopFile: Access to ' "/home/serg/1c.desktop" ' denied, not owned by root, executable flag not set. 

dolphin(18056) KDesktopFile::isAuthorizedDesktopFile: Access to ' "/home/serg/1c.desktop" ' denied, not owned by root, executable flag not set. 

Ошибка сегментирования

And ther is no core file in user homefolder.
Comment 8 Eugene Shatokhin 2012-10-12 11:18:09 MSD
Could the user perform some additional steps just to make sure creation of core dumps is set up properly? Namely:

$ su
# ulimit -f unlimited
# ulimit -c unlimited
# ulimit -c 

What has the last command printed? It should print "unlimited", if the output is different, please post it here.

Then (without leaving the superuser mode, this is important):

# echo "core" > /proc/sys/kernel/core_pattern
# cat /proc/sys/kernel/core_pattern

What has the last command printed? It should print "core", if the output is different, please post it here.

Then start Dolphin from the shell where the previous commands were executed (again, without leaving the superuser mode): 

# dolphin

Try to access the samba shares as before. If Dolphin crashes, a core dump file should be created in the current directory. The name of the file may be "core" or "core.<number>", where "<number>" is the ID of the process that has crashed.

Take a look:

# ls core*

If this command shows no core files, please let us know.
Comment 9 FirstLevel 2012-10-14 14:11:20 MSD
(In reply to comment #8)
> Could the user perform some additional steps just to make sure creation of
> core dumps is set up properly? Namely:
> 
> $ su
> # ulimit -f unlimited
> # ulimit -c unlimited
> # ulimit -c 
> 
> What has the last command printed? It should print "unlimited", if the
> output is different, please post it here.
> 
> Then (without leaving the superuser mode, this is important):
> 
> # echo "core" > /proc/sys/kernel/core_pattern
> # cat /proc/sys/kernel/core_pattern
> 
> What has the last command printed? It should print "core", if the output is
> different, please post it here.
> 
> Then start Dolphin from the shell where the previous commands were executed
> (again, without leaving the superuser mode): 
> 
> # dolphin
> 
> Try to access the samba shares as before. If Dolphin crashes, a core dump
> file should be created in the current directory. The name of the file may be
> "core" or "core.<number>", where "<number>" is the ID of the process that
> has crashed.
> 
> Take a look:
> 
> # ls core*
> 
> If this command shows no core files, please let us know.

User has answered:

# ulimit -c
unlimited

# cat /proc/sys/kernel/core_pattern
core

# dolphin
QGtkStyle cannot be used together with the GTK_Qt engine.
dolphin(7723)/kdeui (kdelibs): Session bus not found 
To circumvent this problem try the following command (with Linux and bash) 
export $(dbus-launch) 
Аварийный останов (слепок снят)

# ls core*
ls: невозможно получить доступ к core*: Нет такого файла или каталога
Comment 10 Eugene Shatokhin 2012-10-15 15:40:42 MSD
It is strange the core dump is not created. 

The crash in Dolphin described in the comment above is probably not related to the original problem reported here.

A couple more questions:

1. Are at least 100 Mb of space available in the disk partition where the core dump is to be created?

2. What 'uname -r' outputs?

If saving of crash dumps does not work, one can try to use GDB to locate where exactly the crash occurred. Here are the instructions.

First, install gdb and kdebase4-debug:

# urpmi gdb kdebase4-debug

The rest should be done as a normal user rather than as a root.

$ gdb dolphin
(gdb) set logging file dolphin-gdb.log
(gdb) set logging on
(gdb) run

Dolphin should start. Please do the operations now that made Dolphin crash in the past: try to access the Samba shares, etc.

Has Dolphin crashed this time? If so, GDB should print something like 
  Program received signal SIGSEGV, Segmentation fault.

GDB may also complain about missing debug package(s), you may ignore that.

Show the processes involved in the crash:

(gdb) info inferiors

Show the backtrace of the current process:

(gdb) bt

GDB should output a series of records
#0 ...
#1 ...

(gdb) quit

If GDB warns about something like "Inferior 1 [process <number>] will be killed", answer "y" (that means, "quit anyway").

The output produced by the commands you have executed in GDB should now be in dolphin-gdb.log.

Locate dolphin-gdb.log in the current directory, check that it is not empty. If
so, please attach this file to this bug report. This may help locate the problem.
Comment 11 FirstLevel 2012-10-16 09:08:43 MSD
Created attachment 693 [details]
dolphin gdb log
Comment 12 FirstLevel 2012-10-16 09:09:22 MSD
Created attachment 694 [details]
core file
Comment 13 Eugene Shatokhin 2012-10-18 12:25:14 MSD
Unfortunately, I still cannot reproduce the problem on my machines.

However, according to the backtrace in the GDB log, the problem could be not in Dolphin itself but rather in a plugin for it provided by ROSA Sync client. 

To make sure, could you try the following:

1. Uninstall ROSA Sync client:

# urpme psyncclient libpsync

2. Reboot the machine.

3. Do what made Dolphin crash in the past and see if it still crashes in that situation.

4. If it still crashes, please obtain GDB log as you did before and attach it to this report.

5. If you use ROSA Sync client, install it again and then reboot:

# urpmi psyncclient libpsync
Comment 14 Eugene Shatokhin 2012-10-18 17:39:13 MSD
Created attachment 747 [details]
Log of GDB session with more symbol information
Comment 15 Eugene Shatokhin 2012-10-18 17:48:22 MSD
I have finally managed to reproduce the problem. Among other things, one needs to be logged in with 2safe.com via ROSA Sync client for the crash to trigger.

Attached is the log of GDB with a more exact backtrace (more symbol information).

As far as I can see from the code, the problem is indeed in ROSA Sync client plugin for Dolphin. Changing the "RPM Package" field of this bug report accordingly.

The crash occurs when the following is executed (dolphin-plugin/syncfileitemplugin.cpp, SyncFileItemPlugin::actions()): 

request["local_path"] = fileItemInfos.first().localPath().toLocal8Bit().data();

It looks like 'fileItemInfos.first()' is a "null" object (i.e. KFileItem::d is NULL), this caused the segfault.

The problem might be fixed in the updated psyncclient package to be available soon:
http://bugs.rosalinux.ru/show_bug.cgi?id=894

At least, they check if 'fileItemInfos.first().isNull()' is true there.
Comment 16 Eugene Shatokhin 2012-10-18 18:07:42 MSD
I have just checked the updated version of psyncclient (0.1-53), seems to work fine, no crash so far.
Comment 17 FirstLevel 2012-10-23 16:23:42 MSD
(In reply to comment #16)
> I have just checked the updated version of psyncclient (0.1-53), seems to
> work fine, no crash so far.

User has said that deletion of Rosa Sync Client solved the problem with Dolphin crash.
But when will we get new psyncclient?
Comment 18 Eugene Shatokhin 2012-10-23 16:43:50 MSD
From the comments in the corresponding bug, it looks like the update is delayed due to other issues in it, unfortunately, I cannot say for how long. See

http://bugs.rosalinux.ru/show_bug.cgi?id=894

Perhaps the QA team and/or the developers of psyncclient could provide more info.
Comment 19 Denis Silakov 2012-12-11 17:48:49 MSK
Updated psyncclient has been finally published to the repositories.