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

[BUG] Fix errors with zap Sync method. #116

Open
nickeskov opened this issue Oct 18, 2022 · 1 comment
Open

[BUG] Fix errors with zap Sync method. #116

nickeskov opened this issue Oct 18, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@nickeskov
Copy link
Member

Describe the bug
Sync method of zap returns error sync /dev/stderr: inappropriate ioctl for device. Also the strange behavior appears in tests: sync /dev/stderr: bad file descriptor.

To Reproduce
Steps to reproduce the behavior:

  1. Run nodemon any other binary from this repo. And to reproduce the second error run
  2. Send interrupt signal to the running process or wait till the end of a test.
  3. And we see the error message

Expected behavior
No error.

Desktop (please complete the following information):

  • System Version: macOS 12.6 (21G115)
  • Kernel Version: Darwin 21.6.0

Additional context
TestAnalyzer_analyzeStateHash test log:

=== RUN   TestAnalyzer_analyzeStateHash
=== RUN   TestAnalyzer_analyzeStateHash/TestCase#1
# .................. rows omitted
2022-10-19T01:23:24.318+0300	INFO	analysis/analyzer.go:154	On polling complete of 2 nodes
2022-10-19T01:23:24.318+0300	INFO	analysis/analyzer.go:160	Total statemetns count: 8
2022/10/19 01:23:24 sync /dev/stderr: bad file descriptor
--- PASS: TestAnalyzer_analyzeStateHash (0.00s)
    --- PASS: TestAnalyzer_analyzeStateHash/TestCase#1 (0.00s)
PASS

Nodemon log:

2022-10-19T01:28:09.400+0300    INFO    analysis/analyzer.go:154        On polling complete of 1 nodes
2022-10-19T01:28:09.400+0300    INFO    scraping/scraper.go:83  Polling of 1 nodes completed with 3 events collected
2022-10-19T01:28:09.400+0300    INFO    analysis/analyzer.go:160        Total statemetns count: 1
2022-10-19T01:28:09.876+0300    INFO    nodemon/nodemon.go:185  shutting down
2022/10/19 01:28:09 sync /dev/stderr: inappropriate ioctl for device
@nickeskov nickeskov added the bug Something isn't working label Oct 18, 2022
@nickeskov
Copy link
Member Author

See uber-go/zap#991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants