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]: logservice lost connection due to memory constraints, swap #9646

Open
1 task done
fengttt opened this issue May 23, 2023 · 19 comments
Open
1 task done

[Bug]: logservice lost connection due to memory constraints, swap #9646

fengttt opened this issue May 23, 2023 · 19 comments
Assignees
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use team/c2
Milestone

Comments

@fengttt
Copy link
Contributor

fengttt commented May 23, 2023

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): 6a65b65cecb3
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

Run the following test, docker compose with 2 cn. On a machine with relatively small memory (16G), it will swap and cause timeout due to memory resource.

Expected Behavior

No response

Steps to Reproduce

ftian;

drop table if exists t;

create table t (i int, j int);

insert into t values (1, 1), (2, 2), (3, 3), (4, 4), (5, null), (null, 5);

insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
select count(*) from t;

insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
select count(*) from t;

insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
select count(*) from t;

insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
select count(*) from t;

insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
select count(*) from t;

delete from t where i = 1;
delete from t where i = 2;
select count(*) from t;

insert into t select * from t;
select count(*) from t;

Additional information

This is used to repro #9447

@fengttt fengttt added kind/bug Something isn't working needs-triage labels May 23, 2023
@fengttt fengttt assigned matrix-meow and m-schen and unassigned matrix-meow May 23, 2023
@fengttt fengttt added the severity/s0 Extreme impact: Cause the application to break down and seriously affect the use label May 23, 2023
@fengttt fengttt added this to the V0.8.0 milestone May 23, 2023
@fengttt
Copy link
Contributor Author

fengttt commented May 23, 2023

XuPeng did a memory profiling, it is mainly in S3Writer.WriteS3Batch. Quick look at the code shows the code need major rewrite.

@m-schen
Copy link
Contributor

m-schen commented Jun 5, 2023

no fix.

@fengttt
Copy link
Contributor Author

fengttt commented Jun 6, 2023

no fix.

What does this mean ... You don't know how to fix or you say we should not fix?

@m-schen
Copy link
Contributor

m-schen commented Jun 8, 2023

no fix.

What does this mean ... You don't know how to fix or you say we should not fix?

我还没有空看这个issue.

@domingozhang domingozhang modified the milestones: V0.8.0, 1.0.0 Jun 30, 2023
@m-schen
Copy link
Contributor

m-schen commented Jul 21, 2023

用当前最新的main分支 f7a8c81 进行测试。
insert均可以较快完成,delete from语句迟迟无法返回结果,且此时cpu占用很低,约为0.3 core。
需要跟一下delete流程中发生了什么问题。

@sukki37 sukki37 modified the milestones: 1.0.0, 1.1.0 Aug 18, 2023
@m-schen
Copy link
Contributor

m-schen commented Nov 15, 2023

还在做别的issue.

@m-schen
Copy link
Contributor

m-schen commented Jan 29, 2024

没有进行相关工作

@m-schen
Copy link
Contributor

m-schen commented Feb 1, 2024

没有进行相关工作。1.2没时间安排这个,这个先放backlog。

@m-schen m-schen modified the milestones: 1.2.0, Backlog Feb 1, 2024
@m-schen
Copy link
Contributor

m-schen commented Mar 29, 2024

近期不会安排该工作。

@m-schen
Copy link
Contributor

m-schen commented Jun 4, 2024

与上一个评论相同

@m-schen
Copy link
Contributor

m-schen commented Jun 7, 2024

同上一个评论

@m-schen
Copy link
Contributor

m-schen commented Jun 12, 2024

在改别的s-1中

@m-schen
Copy link
Contributor

m-schen commented Jun 17, 2024

在改connection reset的s-1中

@m-schen
Copy link
Contributor

m-schen commented Jun 20, 2024

无投入。

@m-schen
Copy link
Contributor

m-schen commented Jun 25, 2024

今天没跟踪这个问题。

@m-schen m-schen removed the severity/s0 Extreme impact: Cause the application to break down and seriously affect the use label Jun 25, 2024
@fengttt fengttt added the severity/s0 Extreme impact: Cause the application to break down and seriously affect the use label Oct 29, 2024
@fengttt fengttt assigned XuPeng-SH and unassigned m-schen Oct 29, 2024
@fengttt
Copy link
Contributor Author

fengttt commented Oct 29, 2024

用当前最新的main分支 f7a8c81 进行测试。 insert均可以较快完成,delete from语句迟迟无法返回结果,且此时cpu占用很低,约为0.3 core。 需要跟一下delete流程中发生了什么问题。

This is still true as of 2024/10/29. Hang, or very slow on
delete from t where i = 1;
@XuPeng-SH please check if this should be fixed by bulk delete.

@fengttt
Copy link
Contributor Author

fengttt commented Oct 29, 2024

Update of my test run. A failure, then we can delete. Could be related to merge.

my:dump@127/mysql=> delete from t where i = 1;
error: mysql: 1105: context deadline exceeded
internal error: commitUnsafe
my:dump@127/mysql=> delete from t where i = 2;
DELETE 33554432
my:dump@127/mysql=> select count(*) from t;
 count(*)
-----------
 167772160
(1 row)

my:dump@127/mysql=> delete from t where i = 2;
DELETE
my:dump@127/mysql=> delete from t where i = 1;
DELETE 33554432
my:dump@127/mysql=>

@XuPeng-SH
Copy link
Contributor

@volgariver6

@XuPeng-SH XuPeng-SH assigned volgariver6 and unassigned XuPeng-SH Nov 3, 2024
@volgariver6
Copy link
Contributor

in process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use team/c2
Projects
None yet
Development

No branches or pull requests

8 participants