Helping Developers Help You. Tom Caputi

Similar documents
Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3

Git & Github Fundamental by Rajesh Kumar.

Overview. 1. Install git and create a Github account 2. What is git? 3. How does git work? 4. What is GitHub? 5. Quick example using git and GitHub

CSE 374 Programming Concepts & Tools. Brandon Myers Winter 2015 Lecture 11 gdb and Debugging (Thanks to Hal Perkins)

CSE 15L Winter Midterm :) Review

CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic

System Architecture 2008/09 Programming Assignment 3. 2 Overview on System/161 Memory Management Hardware

Intro to Segmentation Fault Handling in Linux. By Khanh Ngo-Duy

Debugging Kernel without Debugger

How to version control like a pro: a roadmap to your reproducible & collaborative research

Maintaining an Out-of-Tree Driver and an Upstream Driver Simultaneously (with minimal pain)

CSE 4/521 Introduction to Operating Systems

Version control system (VCS)

SECTION 2: HW3 Setup.

Software Development I

CSE 374 Programming Concepts & Tools

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

Firmware Test Suite (fwts) Alex Hung BIOS Engineer, Hardware Enablement

Exercise Session 6 Computer Architecture and Systems Programming

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2

CISC 7310X. C03: Process. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 2/15/2018 CUNY Brooklyn College

CSE 391 Lecture 9. Version control with Git

Geant4 on Azure using Docker containers

ag.el Documentation Release 0.45 Wilfred Hughes

2 Initialize a git repository on your machine, add a README file, commit and push

Section 1: Tools. Kaifei Chen, Luca Zuccarini. January 23, Make Motivation How... 2

Package Management with EUPS: A Crash Course

Debugging and Version control

SECTION 1: CODE REASONING + VERSION CONTROL

SECTION 1: CODE REASONING + VERSION CONTROL

vrealize Code Stream Trigger for Git

Software Project (Lecture 4): Git & Github

New Contributor Tutorial and Best Practices

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

DEBUGGING ON FERMI PREPARING A DEBUGGABLE APPLICATION GDB. GDB on front-end nodes

Make Your Own Linux Module CS 444/544

SECTION 2: Loop Reasoning & HW3 Setup

Introduction to Supercomputing

CS354 gdb Tutorial Written by Chris Feilbach

SECTION 2: Loop Reasoning & HW3 Setup

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

Debugging and Profiling

Laboratorio di Programmazione. Prof. Marco Bertini

Darcs what, why and how. Ganesh Sittampalam London HUG, 24 th April 2013

Lab 4: Shell Scripting

Lecture 3: Processing Language Data, Git/GitHub. LING 1340/2340: Data Science for Linguists Na-Rae Han

Git: (Distributed) Version Control

Intel Parallel Studio XE 2017 Composer Edition BETA C++ - Debug Solutions Release Notes

Git Introduction CS 400. February 11, 2018

Software Revision Control for MASS. Git Basics, Best Practices

T A B L E O F C O N T E N T S


Poulpe Documentation. Release Edouard Klein

Version (Source Code) Control SWEN-250

README for X11R7.5. The X.Org Foundation 1. October 2009

T A B L E O F C O N T E N T S

This program is designed to help you generate and send bug reports (and thank-you notes) about perl5 and the modules which ship with it.

Version control with Git.

SECTION 1: CODE REASONING + VERSION CONTROL + ECLIPSE

Scientific Software Development with Eclipse

Operating System System Call & Debugging Technique

Chapter 3. Revision Control

New features in and around the FreeBSD portstree

Today s presentation. Git gdb Project 1

Lecture 6 Remotes. Sign in on the attendance sheet!

Arch Linux Grub You Need To Load The Kernel First

Game Server Manager Documentation

A Practical Introduction to git

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

Red Hat Enterprise Linux 8.0 Beta

Having Fun with Social Coding. Sean Handley. February 25, 2010

Revision Control. An Introduction Using Git 1/15

Memory Management 9th Week

Git for Version Control

Kivy Designer Documentation

Chat Channels Via Kafka (with Grading Notes)

Managing PKI Deployments. WhiteRabbitSecurity

We d like to hear your suggestions for improving our indexes. Send to

CLOSE ENCOUNTERS OF THE UPSTREAM RESOURCE

The State of Kernel Debugging Technology. Jason Wessel - Product Architect for WR Linux Core Runtime - Kernel.org KDB/KGDB Maintainer

Release Notes McAfee Application Control 6.1.0

Debugging with gdb and valgrind

Jackson Marusarz Software Technical Consulting Engineer

chatterbot-weather Documentation

GitLab-CI for FPGA development at LHCb 21/11/2018 CERN ELECTRONICS USERS GROUP - GITLAB CI FOR FPGAS 1

OPERATING SYSTEMS ASSIGNMENT 2 SIGNALS, USER LEVEL THREADS AND SYNCHRONIZATION

Mantis STIX Importer Documentation

Version control CSE 403

Contribute To Linux Mainline

git and the virtue of version control ECE /2/2015

Using git to download and update BOUT++

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

TEGRA LINUX DRIVER PACKAGE (R15.BETA)

Lab 1: Space Invaders. The Introduction

Project 1. Fast correction

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

Linux FastBoot. Reducing Embedded Linux Boot Times. Embedded World Conference 2012

Andrew Gabriel Cucumber Technology Ltd 17 th June 2015

An Introduction to Subversion

How Not to Write a Block

Transcription:

Helping Developers Help You Tom Caputi tcaputi@datto.com

The ZFS Code Base 2

The ZFS on Linux* Code Base: Statistics Source code 641 files 383950 lines of code ZFS Test suite (not including ztest) 1327 files 109193 lines of script Contributors 3435 git commits 239 People 15 Sponsor Companies of the 2017 Developer Summit * Not counting Illumos, FreeBSD, OSX code bases! 3

4

5

Mistakes Happen! We re sorry. We are trying our best No one person knows the entire code base Please help us make ZFS better for everyone 6

The ZoL Git Repository 7

What is Github? git is a source code version control software Helps to keep track of code contributions Developers can work simultaneously on different issues Github is a website built around git Acts as the central truth of what ZFS on Linux is Issue tracking and comment threads Release management Hooks for running automated tests Easy(ish) user interface to manage the project 8

9

ZFS repo: https://github.com/zfsonlinux/zfs SPL repo: https://github.com/zfsonlinux/spl 10

Latest commit: contribution 11

Source code (including the last commit that touched that file / directory) 12

Commit log 13

14

Title and description 15

Authors and contributors 16

Diff: list of code changes made in this commit 17

Commit hash: unique identifier for this commit 18

19

Issues / Feature requests submitted by users 20

21

Reporting Issues and Debugging Basics 2 2

Search for existing issues Step 1: Check to make sure your issue hasn t already been filed Read through the ticket to make sure it matches your symptoms If the ticket is closed, read the comments for workarounds / solutions If the ticket is open, skip Step 2 23

Create a new issue ticket Step 2: If you don t find an issue like yours open a new ticket 24

Create a new issue ticket Step 3: Provide any debugging info you may have. If you think that the problem involves a certain feature, you can @ tag the developer of that feature to get their attention 25

Providing Debugging Information: The Basics System information ZFS Version: cat /sys/module/zfs/version Kernel version: uname -r Operating System Distribution CPU architecture: (almost always x86_64) ZFS Configuration Pool layout: zpool status <pool> List of relevant datasets: zfs list Properties of affected datasets: zfs get all <dataset> 26

Identifying Problems: Crashes and Deadlocks Crashes Task never completes Commands can t be killed System may become completely unresponsive Stack trace appears in dmesg Deadlocks Very similar to a crash (commands never complete, can t be killed) System still responsive on other consoles Stack traces may appear in dmesg after 5 minutes or so 27

28

Stack trace: shows where in the code the problem occurred * include a few lines above the trace 29

Identifying Problems: Other Issues Performance Issues Task eventually completes, but takes too much time / system resources Commands can be killed Warnings may be printed in dmesg (probably not) Be sure to provide statistics about what isn t performing well Other Issues Errors: ZFS returns errors when commands are used properly Non-intuitive behavior: ZFS does not function reasonably UI problems: commands / docs are inaccurate or unclear 30

Providing Debugging Information: Extended Steps to Reproduce THE MOST HELPFUL INFO YOU CAN PROVIDE Drastically reduces time to fix Allows developer to work on a fix without waiting for you to reply Most other debug info isn t important if you have this Sequence of commands that trigger the issue If the issue is intermittent, provide approximate reproduction rate Information on ZFS workload If you can t reproduce the info provide info about ZFS usage Kinds of files stored, zfs commands being run, etc 31

Providing Debugging Information: Extended Recompiling with --enable-debug and --enable-debuginfo ZFS has a compilation option that includes added sanity checks Turns on ASSERTs Turns on extra debugging by default Forces debug symbols to be compiled into the binaries Try this if: You are proficient at compiling your own source code Your issue is causing your system to panic You want to ensure that you are providing as much info as possible 32

Providing Debugging Information: Situational ZFS debug message log Does not require debug build echo 1 > /sys/module/zfs/parameters/zfs_dbgmsg_enable echo 0xffffffde > /sys/module/zfs/parameters/zfs_flags cat /proc/spl/kstat/zfs/dbgmsg Line Number from stack trace Requires debug build Allows you to convert a stack trace to a line of code (See next slide) 33

34

Some stack traces will include a RIP: gdb -batch -ex \ 'list *(multilist_sublist_remove+0x10)' \ $(modinfo zfs grep filename awk '{ print $2 }') 35

Issue Examples 3 6

Issue Examples Hard Issues https://github.com/zfsonlinux/zfs/issues/7151 Easy Issues https://github.com/zfsonlinux/zfs/issues/7335 https://github.com/zfsonlinux/zfs/issues/7365 37