Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when connecting #106

Open
RealSkeptic opened this issue Mar 31, 2016 · 35 comments
Open

Crash when connecting #106

RealSkeptic opened this issue Mar 31, 2016 · 35 comments
Labels

Comments

@RealSkeptic
Copy link

I downloaded and installed psequel. Launched it, and it shows the connect dialog, but when I fill in the connection details and click the connect button, it crashes immediately and invariably. I tried entering a different user for the database, or using the host IP instead of its name, but to no avail.

OS: Mac OS X El Capitan 10.11.4.

Crash Log

@daninfpj
Copy link

daninfpj commented May 2, 2016

+1

@brighttank
Copy link

+1 Was working fine until yesterday. I have no idea what changed.

@psequel psequel added the bug label May 4, 2016
@willmm
Copy link

willmm commented Jun 4, 2016

This problem also occurs for me with version 1.4.4 on OS X 10.11.5 a month after it was first reported. I tried with previous versions and they all behaved in the same way.

There are tickets created since this issue was raised, which suggests it still works for some people. Is there something I can do to make it work on my computer?

@RealSkeptic
Copy link
Author

For some reason, I launched it now and it works properly. I have a different Mac now, so the problem may be hardware related for some reason? Or related to a corrupted system file that a new Mac would have a clean version of?

@psequel
Copy link
Owner

psequel commented Jun 6, 2016

@willmm @RealSkeptic I have no idea what causes this problem as I'm unable to reproduce the crash. Could be related to system files like you said, or configuration of your databases, or something else...If you would like to help, could you allow me to connect to your database?

@willmm
Copy link

willmm commented Jun 6, 2016

Yes. Some more investigation suggests it's something on the computer. I installed it on a different computer and got an error message there when trying to connect to a non-existent Postgres installation. On my own computer it crashes when trying to connect to a non-existent Postgres installation. That suggests it's not the database.

Here is the what the system log says when it crashes:

Jun  6 10:25:12 iMac2 secd[1502]:  secTaskDiagnoseEntitlements MISSING keychain entitlements: raw entitlement values: <CFBasicHash 0x7fbbd0d07010 [0x7fff79dc7440]>{type = mutable dict, count = 0,
    entries =>
    }
Jun  6 10:25:12 iMac secd[1502]:  secTaskDiagnoseEntitlements MISSING keychain entitlements: original ag: (null)
Jun  6 10:25:12 iMac secd[1502]:  secTaskDiagnoseEntitlements MISSING keychain entitlements: newly parsed ag: (null)
Jun  6 10:25:12 iMac secd[1502]:  __security_simulatecrash Simulating crash, reason: keychain entitlement(s) missing, code=53c00007
Jun  6 10:25:12 iMac secd[1502]:  __security_simulatecrash_link SimulateCrash not available
Jun  6 10:25:12 iMac secd[1502]:  securityd_xpc_dictionary_handler PSequel[45211] copy_matching Error Domain=NSOSStatusErrorDomain Code=-34018 "client has neither application-identifier nor keychain-access-groups entitlements" UserInfo={NSDescription=client has neither application-identifier nor keychain-access-groups entitlements}
Jun  6 10:25:12 iMac PSequel[45211]:  SecOSStatusWith error:[-34018] Error Domain=NSOSStatusErrorDomain Code=-34018 "client has neither application-identifier nor keychain-access-groups entitlements" UserInfo={NSDescription=client has neither application-identifier nor keychain-access-groups entitlements}
Jun  6 10:25:13 iMac com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x1000008b.PSequel[45211]): Service exited due to signal: Illegal instruction: 4
Jun  6 10:25:13 iMac com.apple.xpc.launchd[1] (com.apple.ReportCrash[45256]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.ReportCrash
Jun  6 10:25:13 iMac diagnosticd[88]: No UUID for trace slot 32767
Jun  6 10:25:13 iMac ReportCrash[45256]: platform_thread_get_unique_id matched 28142149
Jun  6 10:25:13 iMac ReportCrash[45256]: Activity ID for thread 0x1ad6a45 - 0x0
Jun  6 10:25:14 iMac ReportCrash[45256]: Saved crash report for PSequel[45211] version 1 (1.4.4) to /Users/#####/Library/Logs/DiagnosticReports/PSequel_2016-06-06-102514_iMac.crash

There is nothing in the system log on the computer where it does not crash. Later I will try starting the computer is safe mode to see if it works then. This is an old computer (iMac Early 2008) but I don't see why that would make a difference.

@willmm
Copy link

willmm commented Jun 6, 2016

OK, I have tried it with a new user and with safe boot and with a combination of both. It crashes when I click the connect button in every case. I no longer get the messages in the system log about security when it crashes.

The failure in safe boot says it's something in the system, not an add-on I have installed. The failure to get an error message when Postgres is not running suggests it's not a problem in the database.

I don't know what you could see by connecting to here, but let me know if you can think of anything.

@psequel
Copy link
Owner

psequel commented Jun 7, 2016

@willmm By "non-existent Postgres installation", do you mean the host doesn't exist, or the host exists but no Postgres server is running on that host and port? I tried both cases and PSequel was able to report correct error messages. I'm also using PSequel 1.4.4 on OS X 10.11.5.

@willmm
Copy link

willmm commented Jun 7, 2016

I mean the host exists (localhost) but no Postgres server is running.

Last night I reinstalled the operating system and it still does not work. The computer where it doesn't work is running from an external disk because the internal one is faulty. Later this week I intend to install a new internal disk. If the computer still works after that, I'll then try again.

@willmm
Copy link

willmm commented Jun 16, 2016

I tried this again after changing my hard disk. It still does not work. I also tested on another computer and it doesn't work there either.

Now I have concluded the problem is related to the hardware or some combination of the way it was compiled and the hardware. Neither of the computers where it does not work will be able to use the next version of the operating system (Sierra). They are an iMac (24-inch, Early 2008) and a Mac mini (Early 2009). The one on which it does work is a Mac mini (Late 2014). All of them are running El Capitan (10.11.5).

I will have to use something else to access my database :-(

@RealSkeptic
Copy link
Author

Note that the machine for which it failed for me was iMac from 2010, so it's not related to Sierra, though it may well be a hardware issue.

@chvanikoff
Copy link

chvanikoff commented Jun 19, 2016

Same happens to me on iMac 27 late 09 with El Capitan 10.11.5 (which is OK for Sierra afaik) :(

@psequel
Copy link
Owner

psequel commented Jun 20, 2016

Looks like this happens on 2009 and 2010 iMac's only. You may try compiling psqlodbc on your machine and overwriting the one shipped with PSequel.

brew install psqlodbc --HEAD
cp /usr/local/Cellar/psqlodbc/HEAD/lib/psqlodbcw.so /Applications/PSequel.app/Contents/Frameworks/psqlodbcw.so

@willmm
Copy link

willmm commented Jun 20, 2016

No, it's not only 2009 and 2010 iMacs. As I said before it happens on an iMac (24-inch, Early 2008) and a Mac mini (Early 2009).

Your instructions for compiling psqlodbc assume Homebrew is installed. Perhaps that is the problem for older computers.

@psequel
Copy link
Owner

psequel commented Jun 21, 2016

PSequel doesn't assume homebrew installed though. Homebrew is just an easy way to compile psqlodbc if it's supported by your computer. You could git clone git://git.postgresql.org/git/psqlodbc.git and compile it yourself.

@willmm
Copy link

willmm commented Jun 22, 2016

As you suggested I have compiled my own copy of psqlodbc. In order to do this without Homebrew, I had to compile and install either iODBC or unixODBC. I installed both and used iODC for the compilation.

After installing this it works OK.

@willmm
Copy link

willmm commented Jun 22, 2016

I forgot to say, I downloaded this source code bundle rather than using git.

When compiling it put the file psqlodbcw.so into a folder called .libs, which means it is hidden in the finder. At first I though it had not worked correctly because I could not see the file. Then I ran the compile again and noticed it was putting files into this hidden folder.

@psequel
Copy link
Owner

psequel commented Jun 23, 2016

@willmm Awesome! Thanks for sharing your experience. This confirms that psqlodbc compiled on my machine doesn't work on early Mac's

@flaviocamilo
Copy link

The same happens to me. When I hit the button to connect (working server and database; tested with other clients) it crashes.
MacOS El Capitan on a Late 2008 MacBook Pro. PSequel 1.5.0 installed via Homebrew Cask.

@psequel
Copy link
Owner

psequel commented Jul 12, 2016

For those who are using an early Mac, please try @willmm's solution for compiling psqlodbc on your own Mac in the meantime.

@t-anjan
Copy link

t-anjan commented Jul 12, 2016

I can confirm that @psequel's solution works for me. I had Homebrew, so that was the easiest solution.

I have a 2008 Intel Core 2 Duo T9300 MacBook Pro.

I am attaching the compiled psqlodbcw.so if it would help anybody else.

psqlodbcw.so.zip

@andypotion
Copy link

This issue is happening on my Mid 2009 Macbook Pro. The homebrew copy of psqlodbc does fix it, although t-anjan's compiled copy does not.

@jessecurry
Copy link

👍

Thanks @psequel!

@drbraden
Copy link

The homebrew copy of psqlodbc worked for me as well (MBP, 10.10.5, mid-2009). The only change I had to make was to the directory name. Homebrew included the git short hash in the directory name when I ran it, so the commands ended up being:

brew install psqlodbc --HEAD
cp /usr/local/Cellar/psqlodbc/HEAD-7de22ff/lib/psqlodbcw.so /Applications/PSequel.app/Contents/Frameworks/psqlodbcw.so

Thanks for the help!

@tomandersen
Copy link

That fix worked for me.
I did
brew install psqlodbc
cp /usr/local/Cellar/psqlodbc/09.05.0400/lib/psqlodbcw.so /Applications/PSequel.app/Contents/Frameworks/psqlodbcw.so

I am on a 2008 Mac Pro so it may be an old computer thing ?

@psequel
Copy link
Owner

psequel commented Sep 18, 2016

I'm wondering if it's a CPU thing. For those who have this issue, are your Macs using 32-bit CPUs?

@willmm
Copy link

willmm commented Sep 18, 2016

No, I think OS X is only 64 bit now. I could only find this as pdf for Yosemite and for El Capitan. Under "Kernel" both say "OS X now exclusively uses a 64-bit kernel". This page says everything after Core 2 Duo is a 64 bit CPU and mine says it Core 2 Duo in About This Mac.

@tomandersen
Copy link

I have an 8 Core 64 bit machine, Quad-Core Intel Xeon, all 64 bit. OS X past 10.7 or later won’t run on 32 bit ones.

—Tom

Tom Andersen
705 888 4324
~
P/A
Palmer Andersen
www.palmerandersen.com http://www.palmerandersen.com/

Access all your files anywhere with Spotdox
www.spotdox.com http://www.spotdox.com/

On Sep 18, 2016, at 7:20 AM, willmm notifications@github.com wrote:

No, I think OS X is only 64 bit now. I could only find this as pdf for Yosemite https://www.apple.com/ca/osx/pdf/OSXYosemite_TO_FF1.pdf and for El Capitan https://www.apple.com/osx/all-features/pdf/osx_elcapitan_core_technologies_overview.pdf. Under "Kernel" both say "OS X now exclusively uses a 64-bit kernel". This page https://support.apple.com/en-us/HT201948 says everything after Core 2 Duo is a 64 bit CPU and mine says it Core 2 Duo in About This Mac.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #106 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AANg3Z-R8sd8qYh4ymn1pPRXOnxG4Nw9ks5qrR5ygaJpZM4H9FR7.

@tmorton
Copy link

tmorton commented Feb 11, 2017

I got this crash on my mid-2009 Macbook Pro, running OSX 10.10.5

The fix outlined at by @psequel at issuecomment-227052216 worked, although homebrew put the file in a slightly different place. The second line that worked for me was:

cp /usr/local/Cellar/psqlodbc/HEAD-1f495e2_1/lib/psqlodbcw.so /Applications/PSequel.app/Contents/Frameworks/psqlodbcw.so

@lkraider
Copy link

You need to add the keychain entitlement to this project

Here is the crash:

   0x103b74000 -        0x103c1dfff +com.psequel.PSequel (1 - 1.5.3) <85BADDF5-CFEF-3470-AC81-9650E2EA75BF> /Users/USER/*/PSequel.app/Contents/MacOS/PSequel
   0x103c60000 -        0x103c66ff7 +com.samsoffes.SSKeychain (1.4.0 - 1) <1212BA9E-CC30-3450-A7D9-F21C62CDCB27> /Users/USER/*/PSequel.app/Contents/Frameworks/SSKeychain.framework/Versions/A/SSKeychain
   0x103c74000 -        0x103cc4ff3 +libodbc.2.dylib (0) <71E7E56C-D39C-31AD-BFF7-CC262F346FC1> /Users/USER/*/PSequel.app/Contents/Frameworks/libodbc.2.dylib

Known issue with Keychain handling. You could try this in your code:
kishikawakatsumi/KeychainAccess#52 (comment)
soffes/SAMKeychain#52 (comment)

If this project was opensource I could fix it...

@psequel
Copy link
Owner

psequel commented May 14, 2017

@lkraider are you reporting a separate issue? The OP is reporting a crash on an older Mac, where the bundled libodbc was not compiled for.

@lkraider
Copy link

@psequel I tried to build libodbc and it also fixes my issue.

@5http
Copy link

5http commented Mar 10, 2018

@psequel @drbraden working on 2008 macbook pro, yosemite 10.10.2, thank you so much!

@unikitty37
Copy link

Confirming the same issue with a 2009 Mac Pro running Mojave, and that the homebrew-based fix works here as well.

Is there any reason this version of psqlodbcw.so can't be bundled with the app? Does it not work with newer Macs?

@jeffp123
Copy link

Thank you all who suggested to install psqlodbcw.so and manually place in the PSequel Frameworks directory.

I ran into this issue on a 2010 Macbook Pro running High Sierra and the suggestion worked perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests