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

More logs for acra_proxy, acra_server, acra_configui #135

Merged
merged 25 commits into from
Mar 30, 2018

Conversation

vixentael
Copy link
Collaborator

Made logging for acra_proxy, acra_server, acra_configui more user-friendly.

  1. Add custom logging format for acra_configui.
  2. Suggest using error codes to differentiate errors.
  3. Use error codes for most logs.
  4. Add more info/debug logs.
  5. Unify logs language.

@vixentael
Copy link
Collaborator Author

Uh oh, looks like pq library was recently updated.

Will wait until we fix this

@vixentael
Copy link
Collaborator Author

add mutex into logger (https://github.com/cossacklabs/acra/pull/135/files#diff-fe1e6f43a54f4d403e7b3af8a389c9f8R147) to fix errors like

fatal error: concurrent map writes

goroutine 212 [running]:
runtime.throw(0x4285320, 0x15)
	/usr/local/Cellar/go/1.9.1/libexec/src/runtime/panic.go:605 +0x95 fp=0xc42039da10 sp=0xc42039d9f0 pc=0x402baa5
runtime.mapassign_faststr(0x4244fa0, 0xc42007cd80, 0x4282370, 0x8, 0xc4200f8040)
	/usr/local/Cellar/go/1.9.1/libexec/src/runtime/hashmap_fast.go:607 +0x4f5 fp=0xc42039da90 sp=0xc42039da10 pc=0x400f0f5
github.com/cossacklabs/acra/logging.AcraJSONFormatter.Format(0x4399b80, 0xc42008e520, 0xc42007cd80, 0xc4205840f0, 0x0, 0xc42039db98, 0x402ad16, 0x4290020, 0xc42039dba8)
	/Users/hdf/go/src/github.com/cossacklabs/acra/logging/log_formatters.go:143 +0x86 fp=0xc42039db20 sp=0xc42039da90 pc=0x42027e6
github.com/cossacklabs/acra/logging.(*AcraJSONFormatter).Format(0xc42008e540, 0xc4205840f0, 0x411cacd, 0xc420020000, 0xc42039dc10, 0x411acaa, 0xc42009416c)
	<autogenerated>:1 +0x60 fp=0xc42039db78 sp=0xc42039db20 pc=0x4203c00

@vixentael
Copy link
Collaborator Author

add continue(commit) to fix memory address errors like:

ERRO[2018-03-28T11:05:55Z] can't accept new connection (connection=<nil>)  error="accept unix /tmp/unix_socket_6006: use of closed network connection"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x778cdc]

goroutine 20 [running]:
main.(*SServer).Start(0xc4201c2180)
	/home/user/go_path_1.10/src/github.com/cossacklabs/acra/cmd/acraserver/listener.go:180 +0x22c
created by main.main
	/home/user/go_path_1.10/src/github.com/cossacklabs/acra/cmd/acraserver/acraserver.go:294 +0x15cf
.

@vixentael
Copy link
Collaborator Author

meantime:

  1. i have added more logs into integration.sh script to see exactly go version and database that is being tested
  2. enable verbose logging for tests.py (link
  3. fix test TestNoCheckPoisonRecord by changing log lines and putting them into correct place (one, two)
  4. switch into plaintext setting for logs by default, because otherwise circle ci builds sometimes logs are frozen. will investigate this issue later.

@vixentael vixentael merged commit 4ca43e8 into master Mar 30, 2018
@vixentael vixentael deleted the vixentael/T496-more-logs branch March 30, 2018 12:24
@vixentael vixentael added the core label Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants