goroutine 342 [running]: sync.fatal({0xbdff5b, 0x20}) D:/Program Files (x86)/Go/src/runtime/panic.go:1031 +0x29 sync.(*RWMutex).Unlock(0x19f96d0) D:/Program Files (x86)/Go/src/sync/rwmutex.go:209 +0x57 go-study/models.sendMsg(0x0, {0x135fe0f0, 0x15, 0x15}) D:/go/go-study/models/Message.go:193 +0x70 go-study/models.Chat({0x12fe4500, 0x13bec360}, 0x130d0380) D:/go/go-study/models/Message.go:82 +0x3a0 go-study/service.SendUserMsg(0x13bec360) D:/go/go-study/service/userBasicService.go:237 +0x54 github.com/gin-gonic/gin.(*Context).Next(...) D:/Program Files (x86)/Go/bin/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1(0x13bec360) D:/Program Files (x86)/Go/bin/pkg/mod/github.com/gin-gonic/gin@v1.9.0/recovery.go:102 +0x89 github.com/gin-gonic/gin.(*Context).Next(...) D:/Program Files (x86)/Go/bin/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 github.com/gin-gonic/gin.LoggerWithConfig.func1(0x13bec360) D:/Program Files (x86)/Go/bin/pkg/mod/github.com/gin-gonic/gin@v1.9.0/logger.go:240 +0xa7 github.com/gin-gonic/gin.(*Context).Next(...) D:/Program Files (x86)/Go/bin/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0x13be80e0, 0x13bec360) D:/Program Files (x86)/Go/bin/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:620 +0x51b github.com/gin-gonic/gin.(*Engine).ServeHTTP(0x13be80e0, {0xd04140, 0x13c060a0}, 0x130d0380) D:/Program Files (x86)/Go/bin/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:576 +0x1c9 net/http.serverHandler.ServeHTTP({0x13d46000}, {0xd04140, 0x13c060a0}, 0x130d0380) D:/Program Files (x86)/Go/src/net/http/server.go:2947 +0x285 net/http.(*conn).serve(0x132d8360, {0xd048a0, 0x132f2738}) D:/Program Files (x86)/Go/src/net/http/server.go:1991 +0x67d created by net/http.(*Server).Serve D:/Program Files (x86)/Go/src/net/http/server.go:3102 +0x498
时间: 2023-08-22 07:04:58 浏览: 222
这是一个 Go 语言的运行时错误,可能是由于代码中的某些问题导致的。从错误信息来看,很可能是在 `go-study/models/Message.go` 文件的第 193 行调用了 `sync.RWMutex` 的 `Unlock` 方法,但是该 `RWMutex` 并未被锁定,从而导致了 fatal 错误。
建议检查代码中关于锁定和解锁的部分,确保在正确的上下文中使用锁定和解锁操作。另外,可以使用 Go 的调试工具,如 `go tool trace` 或 `go tool pprof`,来进一步分析和定位问题。
相关问题
In file included from ../sysdeps/x86_64/nptl/tls.h:23, from ../include/link.h:51, from ../include/dlfcn.h:4, from ../sysdeps/generic/ldsodefs.h:32, from ../sysdeps/x86/ldsodefs.h:65, from ../sysdeps/gnu/ldsodefs.h:46, from ../sysdeps/unix/sysv/linux/ldsodefs.h:25, from ../sysdeps/x86/dl-get-cpu-features.c:19: ../sysdeps/unix/sysv/linux/x86/include/asm/prctl.h:5:15: fatal error: asm/prctl.h: No such file or directory 5 | #include_next <asm/prctl.h> | ^~~~~~~~~~~~~ compilation terminated. /glibc-2.35/build/sysd-rules:739: recipe for target '/glibc-2.35/build/elf/dl-get-cpu-features.os' failed make[2]: *** [/glibc-2.35/build/elf/dl-get-cpu-features.os] Error 1 make[2]: Leaving directory '/glibc-2.35/elf' Makefile:483: recipe for target 'elf/subdir_lib' failed make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory '/glibc-2.35' Makefile:9: recipe for target 'all' failed make: *** [all] Error 2
这个错误提示表明编译 Glibc 时缺少 asm/prctl.h 文件。这个文件是 Linux 内核源代码中的一个头文件,需要安装 Linux 内核头文件才能解决该问题。
你可以使用以下命令来安装 Linux 内核头文件:
```
sudo apt-get install linux-headers-$(uname -r)
```
如果你运行的是其他 Linux 发行版,请使用相应的命令安装相应的内核头文件。安装完成后,重新编译 Glibc 库即可。
另外,如果你尝试使用 Glibc 的最新版本编译代码,建议使用较新的 Linux 内核版本,否则可能会遇到其他的编译错误。
Cloning into 'Log4Qt'... fatal: unable to access 'https://github.com/MEONMedical/Log4Qt.git/': OpenSSL SSL_read: Connection was reset, errno 10054 Cloning into 'Log4Qt'... fatal: unable to access 'https://github.com/MEONMedical/Log4Qt.git/': OpenSSL SSL_read: Connection was reset, errno 10054 Cloning into 'Log4Qt'... fatal: unable to access 'https://github.com/MEONMedical/Log4Qt.git/': Failed to connect to github.com port 443: Timed out -- Had to git clone more than once: 3 times. CMake Error at Log4Qt-cmake/tmp/Log4Qt-gitclone.cmake:31 (message): Failed to clone repository: 'https://github.com/MEONMedical/Log4Qt.git' NMAKE : fatal error U1077: “D:\BaiduNetdiskDownload\cmake-3.16.0-win64-x64\bin\cmake.exe”: 返回代码“0x1” Stop. NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"”: 返回代码“0x2” Stop. NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"”: 返回代码“0x2” Stop. 15:59:23: 进程"D:\BaiduNetdiskDownload\cmake-3.16.0-win64-x64\bin\cmake.exe"退出,退出代码 2 。 Error while building/deploying project CTK (kit: cmake-3.16.0) The kit cmake-3.16.0 has configuration issues which might be the root cause for this problem. When executing step "CMake Build"
根据你提供的日志信息,看起来你在尝试克隆 'Log4Qt' 项目时遇到了问题。错误提示表明无法访问 'https://github.com/MEONMedical/Log4Qt.git/',并且出现了连接复位、连接超时等错误。
这个问题可能由以下原因引起:
1. 网络问题:你的网络连接可能存在问题,***