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

[YSQL] TestYsqlUpgrade.upgradeIsIdempotent broken in ASAN #10365

Closed
bmatican opened this issue Oct 20, 2021 · 3 comments
Closed

[YSQL] TestYsqlUpgrade.upgradeIsIdempotent broken in ASAN #10365

bmatican opened this issue Oct 20, 2021 · 3 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/failing-test Tests and testing infra priority/high High Priority

Comments

@bmatican
Copy link
Contributor

detective link: https://detective-gcp.dev.yugabyte.com/stability/test?branch=master&class=org.yb.pgsql.TestYsqlUpgrade&name=upgradeIsIdempotent

@bmatican bmatican added area/ysql Yugabyte SQL (YSQL) kind/failing-test Tests and testing infra labels Oct 20, 2021
@bmatican bmatican added the priority/high High Priority label Oct 20, 2021
@pilshchikov
Copy link
Contributor

@frozenspider looks like your commit done this

hash pass/failed/all
1793a65 10/0/10
cceafbb 0/10/10

@frozenspider
Copy link
Contributor

Thanks @pilshchikov, fix is already in the works.

frozenspider added a commit that referenced this issue Oct 27, 2021
Summary:
When running `org.yb.pgsql.TestYsqlUpgrade#upgradeIsIdempotent` in ASAN, the following (slightly groomed) error is produced:

```
==10620==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7efff21dd790 at pc 0x7f0012f16eaa bp 0x7efff21dcd30 sp 0x7efff21dcd28
READ of size 1 at 0x7efff21dd790 thread T30 (rpc_tp_TabletSe)
    #0 0x7f0012f16ea9 in std::__1::basic_string<...>::__is_long() ...
    #1 0x7f0012f16ea9 in std::__1::basic_string<...>::__get_pointer() ...
    #2 0x7f0012f16ea9 in std::__1::basic_string<...>::data() ...
    #3 0x7f0012f16ea9 in std::__1::basic_string<...>::c_str() ...
    #4 0x7f0012f16ea9 in yb::PgDeriveSocketDir(std::__1::basic_string<...> const&) yb/util/pg_util.cc:29
    #5 0x7f002863cf14 in yb::pgwrapper::YsqlUpgradeHelper::Connect(std::__1::basic_string<...> const&) yb/yql/pgwrapper/ysql_upgrade.cc:233:7
    #6 0x7f002863d6aa in yb::pgwrapper::YsqlUpgradeHelper::Upgrade() yb/yql/pgwrapper/ysql_upgrade.cc:251:24
    #7 0x7f0029043b61 in yb::tserver::TabletServiceAdminImpl::UpgradeYsql(...) yb/tserver/tablet_service.cc:1558:38
    #8 0x7f001d74316e in yb::tserver::TabletServerAdminServiceIf::Handle(...) yb/tserver/tserver_admin.service.cc:490:7
    #9 0x7f001427742d in yb::rpc::ServicePoolImpl::Handle(...) yb/rpc/service_pool.cc:260:19
    #10 0x7f00141283f0 in yb::rpc::InboundCall::InboundCallTask::Run() yb/rpc/inbound_call.cc:218:13
    #11 0x7f00142a4c2b in yb::rpc::(anonymous namespace)::Worker::Execute() yb/rpc/thread_pool.cc:105:15
    #12 0x7f0012fbcdd0 in yb::Thread::SuperviseThread(void*) yb/util/thread.cc:771:3
    #13 0x7f0007547ea4 in start_thread (/lib64/libpthread.so.0+0x7ea4)
    #14 0x7f00072709fc in __clone (/lib64/libc.so.6+0xfe9fc)
```

Apparently, `server_->pgsql_proxy_bind_address()` passed to `YsqlUpgradeHelper` constructor by reference from `TabletServiceAdminImpl::UpgradeYsql` somehow goes out of scope.
To fix this, it's now passed by value.

Test Plan: ybd asan --java-test org.yb.pgsql.TestYsqlUpgrade#upgradeIsIdempotent

Reviewers: sergei, mihnea, jason, dmitry

Reviewed By: dmitry

Subscribers: bogdan, yql

Differential Revision: https://phabricator.dev.yugabyte.com/D13557
@frozenspider
Copy link
Contributor

Fixed in 6e0c5d7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/failing-test Tests and testing infra priority/high High Priority
Projects
None yet
Development

No branches or pull requests

3 participants