Skip to content

Commit

Permalink
all: add deadlock detection temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 12, 2024
1 parent a91dbd6 commit 29fa8cc
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ require (
github.com/gabriel-vasile/mimetype v1.4.5
github.com/google/uuid v1.6.0
github.com/rs/zerolog v1.33.0
github.com/sasha-s/go-deadlock v0.3.5
github.com/stretchr/testify v1.9.0
go.mau.fi/util v0.7.1-0.20240904173517-ca3b3fe376c2
golang.org/x/crypto v0.26.0
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
maunium.net/go/mautrix v0.20.1-0.20240905211528-059d9a36e5cf
maunium.net/go/mautrix v0.20.1-0.20240912130037-80d5daa6fff7
)

require (
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8=
github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU=
github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
Expand Down Expand Up @@ -93,5 +95,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M=
maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA=
maunium.net/go/mautrix v0.20.1-0.20240905211528-059d9a36e5cf h1:73OVwmttwOdmIJ+uAmbZg30z2QwFgspbVqGWG7874Ag=
maunium.net/go/mautrix v0.20.1-0.20240905211528-059d9a36e5cf/go.mod h1:l6nYvD5/FMSrAZ/IP1AqJV0b47SRl/0uQNRiy4CcSVk=
maunium.net/go/mautrix v0.20.1-0.20240912130037-80d5daa6fff7 h1:HgxXzqwi+ekWXyHhAwUdTFStvX4FFbEszJtZlI7PmLU=
maunium.net/go/mautrix v0.20.1-0.20240912130037-80d5daa6fff7/go.mod h1:3TU1g6a2zqvBOoIc4AUhDvoabvABUQ3PMpRIX6YPi88=
3 changes: 2 additions & 1 deletion pkg/connector/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ package connector
import (
"context"
"errors"
"sync"
"sync/atomic"
"time"

sync "github.com/sasha-s/go-deadlock"

"github.com/rs/zerolog"
"go.mau.fi/util/exsync"
"maunium.net/go/mautrix/bridge/status"
Expand Down
3 changes: 2 additions & 1 deletion pkg/connector/dbmeta.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import (
"encoding/json"
"fmt"
"slices"
"sync"

sync "github.com/sasha-s/go-deadlock"

"go.mau.fi/util/jsontime"
"maunium.net/go/mautrix/bridgev2/database"
Expand Down
3 changes: 2 additions & 1 deletion pkg/libgm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import (
"net"
"net/http"
"net/url"
"sync"
"sync/atomic"
"time"

sync "github.com/sasha-s/go-deadlock"

"github.com/google/uuid"
"github.com/rs/zerolog"

Expand Down
3 changes: 2 additions & 1 deletion pkg/libgm/longpoll.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import (
"fmt"
"io"
"net/http"
"sync"
"sync/atomic"
"time"

sync "github.com/sasha-s/go-deadlock"

"github.com/google/uuid"
"github.com/rs/zerolog"
"go.mau.fi/util/pblite"
Expand Down
3 changes: 2 additions & 1 deletion pkg/libgm/pair_google.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ import (
"slices"
"strconv"
"strings"
"sync"
"time"

sync "github.com/sasha-s/go-deadlock"

"github.com/google/uuid"
"github.com/rs/zerolog"
"go.mau.fi/util/exslices"
Expand Down
3 changes: 2 additions & 1 deletion pkg/libgm/session_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package libgm
import (
"encoding/base64"
"fmt"
"sync"
"time"

sync "github.com/sasha-s/go-deadlock"

"github.com/google/uuid"
"github.com/rs/zerolog"
"golang.org/x/exp/slices"
Expand Down

0 comments on commit 29fa8cc

Please sign in to comment.