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

SNOW-1802651: Arrow memory leak? #1241

Open
datbth opened this issue Nov 13, 2024 · 2 comments
Open

SNOW-1802651: Arrow memory leak? #1241

datbth opened this issue Nov 13, 2024 · 2 comments
Assignees
Labels
bug Erroneous or unexpected behaviour status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team

Comments

@datbth
Copy link

datbth commented Nov 13, 2024

  1. What version of GO driver are you using?
    v1.12.0

  2. What operating system and processor architecture are you using?
    Ubuntu 24.04.1 LTS

  3. What version of GO are you using?
    go version go1.23.1 linux/amd64

  4. Server version: 8.42.2

  5. What did you do?

	mem := memory.NewCheckedAllocator(memory.NewGoAllocator())
	defer mem.AssertSize(t, 0)

	ctx := sf.WithArrowAllocator(
		context.Background(),
		mem,
	)

	db, err := sql.Open("snowflake", connUrl)
	require.NoError(t, err)
	defer db.Close()

	conn, err := db.Conn(ctx)
	require.NoError(t, err)
	defer conn.Close()

	rows, err := conn.QueryContext(ctx, "select 1")
	require.NoError(t, err)
	defer rows.Close()
	for rows.Next() {
		var v int
		require.NoError(t, rows.Scan(&v))
		assert.Equal(t, 1, v)
	}
  1. What did you expect to see?
  • Expected output: No error
  • Actual output: invalid memory size exp=0, got=64
    /home/datbth/repo/checked_allocator.go:186: LEAK of 64 bytes FROM
                github.com/apache/arrow/go/v15/arrow/ipc.(*messageReader).Message+3a2
                        /home/datbth/go/pkg/mod/github.com/apache/arrow/go/[email protected]/arrow/ipc/message.go:228
  1. Can you set logging to DEBUG and collect the logs?

    https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors

    Before sharing any information, please be sure to review the log and remove any sensitive
    information.

@datbth datbth added the bug Erroneous or unexpected behaviour label Nov 13, 2024
@github-actions github-actions bot changed the title Arrow memory leak? SNOW-1802651: Arrow memory leak? Nov 13, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added the status-triage_done Initial triage done, will be further handled by the driver team label Nov 14, 2024
@sfc-gh-dszmolka
Copy link
Contributor

hi .. we'll take a look.

@sfc-gh-dszmolka sfc-gh-dszmolka added the status-pr_pending_merge A PR is made and is under review label Dec 10, 2024
@sfc-gh-dszmolka
Copy link
Contributor

is fixed with #1270

@sfc-gh-pfus sfc-gh-pfus added status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. and removed status-pr_pending_merge A PR is made and is under review labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Erroneous or unexpected behaviour status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

4 participants