Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Segmentation Fault because of lacking file permissions #150

Closed
MichalPodeszwa opened this issue Dec 20, 2014 · 18 comments
Closed

Segmentation Fault because of lacking file permissions #150

MichalPodeszwa opened this issue Dec 20, 2014 · 18 comments
Labels

Comments

@MichalPodeszwa
Copy link

This is the traceback

> python 
Python 3.4.2 (default, Oct  8 2014, 13:44:52) 
[GCC 4.9.1 20140903 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import spotify
>>> spotify.__version__
'2.0.0b3'
>>> spotify.Session()
zsh: segmentation fault (core dumped)  python

To clarify. This worked for me like 5 minutes ago. I haven't installed anything new or anything.

Having rebooted the PC has not given any result.

I've got libspotify 12.1.51-3. (installed from AUR on Arch).

Am I missing something?

@jodal
Copy link
Owner

jodal commented Dec 20, 2014

Without any config, it'll try to read spotify_appkey.key from the current working directory. Did something happen to that file? Changed contents? Permissions? Try moving/removing the key file and see if it still segfaults.

@MichalPodeszwa
Copy link
Author

That file didn't change at all either.

Everything was the same in the system as it was before, and yet it didn't work afterwards.

-----Wiadomość oryginalna-----
Od: "Stein Magnus Jodal" notifications@github.com
Wysłano: ‎2014-‎12-‎20 23:50
Do: "mopidy/pyspotify" pyspotify@noreply.github.com
DW: "Michał Podeszwa" michal.podeszwa@gmail.com
Temat: Re: [pyspotify] Segmentation Fault when creating session (#150)

Without any config, it'll try to read spotify_appkey.key from the current working directory. Did something happen to that file? Changed contents? Permissions? Try moving/removing the key file and see if it still segfaults.

Reply to this email directly or view it on GitHub.=

@jodal
Copy link
Owner

jodal commented Dec 21, 2014

Can you provide a coredump of the process when it segfaults?

If you unfamiliar with how to do this, this blog post might be of help.

@MichalPodeszwa
Copy link
Author

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff15f43b9 in sp_session_create () from /usr/lib/libspotify.so.12

Hoping that this is what you've asked for.

EDIT: Just gave another shot, and removed the key file completely from my system and downloaded it again. Suddenly it works now.

@jodal
Copy link
Owner

jodal commented Dec 21, 2014

I would love to have a copy of the broken key file, so I can try to figure out the diff and add more Python-level sanity checks to avoid segfaults entirely.

@MichalPodeszwa
Copy link
Author

That's really a shame! Just deleted the only copy. But if that happens to me again, I'll make sure to send you a copy.
Thank you for the help.

@rckclmbr
Copy link

Some people using pyportify are seeing this as well: rckclmbr/pyportify#3 (comment)

He ran a diff between the bad and good, and there were no differences.

@jodal
Copy link
Owner

jodal commented Jan 14, 2015

I'd love to figure this one out, but don't have much to go on at this stage. Maybe check if the pyportify users can reproduce with the example from the first issue here?

Reopening.

@jodal jodal reopened this Jan 14, 2015
@jodal jodal added this to the v2.0.0 milestone Jan 14, 2015
@jodal
Copy link
Owner

jodal commented Jan 26, 2015

@rckclmbr Can this be related to #151?

@rckclmbr
Copy link

@jodal it definitely could be, I'm not explicitly setting the cache location. Let me know when you create a new release in pypi, I'll update and see if it fixes it.

@jodal
Copy link
Owner

jodal commented Jan 26, 2015

The cache_location should default to "tmp", so #151 shouldn't be a problem unless it was explicitly set to None instead.

@rckclmbr
Copy link

Oh, bummer.

@jodal jodal removed this from the v2.0.0 milestone Feb 14, 2015
@jodal jodal removed the 2.x label Mar 25, 2015
@jodal
Copy link
Owner

jodal commented May 8, 2015

Nothing to go on here and downstream has closed/resolved their issue.

@jodal jodal closed this as completed May 8, 2015
@jodal jodal removed the 0 - Backlog label May 8, 2015
@ms7463
Copy link

ms7463 commented Jan 23, 2016

I'm know it's too late, but in case anyone else comes here looking for answers, I just had this problem and it turned out that when I originally ran my script I used root privileges due to some config files I had, eventually when I removed the need for root permissions and ran the script I was getting the seg fault. It's because the tmp file created to store credentials and what not was owned by root, so simply removing this directory and rerunning it solved the issue.

@jodal
Copy link
Owner

jodal commented Jan 23, 2016

Thanks! That sounds like something I can make pyspotify guard against.

On Sat, Jan 23, 2016, 02:30 ArtinSarraf notifications@github.com wrote:

I'm sure it's too late, but I just had this problem and it turned out that
when I originally ran my script I used root privileges due to some config
files I had, eventually when I removed the need for root permissions and
ran the script I was getting the seg fault. It's because the tmp file
created to store credentials and what not was owned by root, so simply
removing this directory and rerunning it solved the issue.


Reply to this email directly or view it on GitHub
#150 (comment).

@jodal jodal reopened this Jan 24, 2016
@jodal jodal self-assigned this Jan 24, 2016
@keithahern
Copy link

Artin, I believe I have done the same thing as you. Run it as root which now causes a SIGSEGV as mopidy. Where was the tmp file you removed? I removed /var/lib/mopidy/spotify but still get it.

@jodal
Copy link
Owner

jodal commented Mar 24, 2016

Maybe /var/cache/mopidy/spotify.

On Thu, Mar 24, 2016, 06:44 keithahern notifications@github.com wrote:

Artin, I believe I have done the same thing as you. Run it as root which
now causes a SIGSEGV as mopidy. Where was the tmp file you removed? I
removed /var/lib/mopidy/spotify but still get it.


You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub
#150 (comment)

@jodal jodal changed the title Segmentation Fault when creating session Segmentation Fault because of lacking file permissions Jul 8, 2019
@jodal jodal removed their assignment Jul 8, 2019
@jodal
Copy link
Owner

jodal commented Jun 14, 2022

Closing as libspotify and pyspotify are dead. See #215 for details.

@jodal jodal closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants