Bug 2128076 - Btrfs send/receive consume all available RAM
Summary: Btrfs send/receive consume all available RAM
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: btrfs-progs
Version: 36
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Josef Bacik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-19 18:47 UTC by Daniel Gonçalves
Modified: 2023-04-23 17:20 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-04-23 17:20:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Content of journalctl -b (362.53 KB, text/plain)
2022-09-20 06:26 UTC, Daniel Gonçalves
no flags Details

Description Daniel Gonçalves 2022-09-19 18:47:28 UTC
Description of problem:
I tried to perform a btrfs send/receive with a remote system (over ssh). After executing the command, it will consume more and more RAM until being killed by systemd-oomd. The subvolume size is 22.83GiB and the total system memory is 16GiB.

Version-Release number of selected component (if applicable):
btrfs-progs v5.18
kernel 5.19.9-200.fc36.x86_64
systemd v250.8-1.fc36
openSSH OpenSSH_8.8p1

How reproducible:


Steps to Reproduce:
1.The command used is:
`sudo btrfs send <local_readonly_snapshot> | ssh -i <path_to_key> <host> "sudo btrfs receive <remote_volume>"`
2.on remote system, `sudo btrfs receive` is configured with NOPASSWD.

Actual results:
btrfs is killed by systemd-oomd

Expected results:
snapshot is sent to remote system successfully

Comment 1 Chris Murphy 2022-09-20 05:01:05 UTC
I can't reproduce this on either Fedora 36 or Fedora 37. Can you attach logs? journalctl -b > journal.log will show both kernel and systemd messages.

Comment 2 Daniel Gonçalves 2022-09-20 06:26:49 UTC
Created attachment 1913052 [details]
Content of journalctl -b

Comment 3 Daniel Gonçalves 2022-11-29 20:33:24 UTC
I think I found a way to reproduce this bug. Just try with fish shell and the bug occurs whereas it works like a charm with bash.

Comment 4 Daniel Gonçalves 2023-04-23 17:20:25 UTC
I was finally able to figure out what was going wrong and it's not a btrfs-progs bug. I finally opened an issue on fish project. You can retrieve it here: https://github.com/fish-shell/fish-shell/issues/9747


Note You need to log in before you can comment on or make changes to this bug.