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

Mac OS X(x86 64bit) で fatal error #32

Closed
YoshihiroIto opened this issue May 11, 2014 · 5 comments
Closed

Mac OS X(x86 64bit) で fatal error #32

YoshihiroIto opened this issue May 11, 2014 · 5 comments

Comments

@YoshihiroIto
Copy link

便利に利用させてもらってます。
久しぶりにバイナリをダウンロードして使ってみたところ fatal error が起きるようになりました。

バイナリは
https://drone.io/github.com/monochromegane/the_platinum_searcher/files/artifacts/bin/darwin_amd64/pt

環境:
OS X 10.9.2

再現法:
https://github.com/SonyWWS/ATF
をクローンしたディレクトリで
pt public
を実行

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
github.com/monochromegane/the_platinum_searcher/search.(*Searcher).Search(0x210378c30, 0x210378c30, 0x2aa220)
    /home/ubuntu/src/github.com/monochromegane/the_platinum_searcher/search/search.go:27 +0x160
main.main()
    /home/ubuntu/src/github.com/monochromegane/the_platinum_searcher/main.go:94 +0x60a

goroutine 4 [chan receive]:
github.com/monochromegane/the_platinum_searcher/search/grep.(*Grepper).ConcurrentGrep(0x210364480)
    /home/ubuntu/src/github.com/monochromegane/the_platinum_searcher/search/grep/grep.go:33 +0x97
github.com/monochromegane/the_platinum_searcher/search.(*Searcher).grep(0x210378c30, 0x2103a8100, 0x2103a8180)
    /home/ubuntu/src/github.com/monochromegane/the_platinum_searcher/search/search.go:51 +0x6a
created by github.com/monochromegane/the_platinum_searcher/search.(*Searcher).Search
    /home/ubuntu/src/github.com/monochromegane/the_platinum_searcher/search/search.go:25 +0x11c

goroutine 5 [chan receive]:
github.com/monochromegane/the_platinum_searcher/search/print.(*Printer).Print(0x210378c90)
    /home/ubuntu/src/github.com/monochromegane/the_platinum_searcher/search/print/print.go:43 +0x60
github.com/monochromegane/the_platinum_searcher/search.(*Searcher).print(0x210378c30, 0x2103a8180, 0x2103a4060)
    /home/ubuntu/src/github.com/monochromegane/the_platinum_searcher/search/search.go:56 +0x4d
created by github.com/monochromegane/the_platinum_searcher/search.(*Searcher).Search
    /home/ubuntu/src/github.com/monochromegane/the_platinum_searcher/search/search.go:26 +0x147
@monochromegane
Copy link
Owner

報告ありがとうございます。こちらでも状況再現しました。
クロスコンパイルでビルドした生成物のみで発生するようで、特定に時間がかかってます。
解決までもう少しお待ちください

@YoshihiroIto
Copy link
Author

了解いたしました。
ひとまず手元でビルドしたものを使っていこうと思います。

@monochromegane
Copy link
Owner

@YoshihiroIto 上記の件、解決しました。対応が遅くなってすみません!

原因は user.Current() が CGO無効の場合に取得できないこと、その際のエラー処理が不適切であったためでした。(drone.ioのクロスコンパイルではCGOが無効になっています)

先日、ホームディレクトリのptignoreをおけば、共通の除外設定として利用できる機能をリリースしましたが、このときに上記関数を呼ぶようになっていました。

今回の修正で、user.Current()がエラーを返す場合、環境変数HOMEを参照するように変更して、CGOの有無にかかわらず上記機能を利用できるように変更しています。

お手元で確認いただければと思います。

@YoshihiroIto
Copy link
Author

先ほど修正出来たことが確認できました。

修正作業ありがとうございました。

@monochromegane
Copy link
Owner


早速の確認ありがとうございます:smile:

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

No branches or pull requests

2 participants